Math Question (Solve for x):

WBahn

Joined Mar 31, 2012
32,706
Numerically.

For an equation like that, there is no closed-form solution. I'm not even sure you can separate x from the rest of the variable.
 

wayneh

Joined Sep 9, 2010
18,088
Agree with previous comments that there is not an analytical solution. You need to plug 'n chug.

You can rearrange to x • [ log(y) - log(x) ] = 27/(5m) but that doesn't really help much.

Just set up a spreadsheet to check the error versus the value of x, and use the solver (or Excel's Goal Seek) to minimize the error.

Of course you can't calculate a numerical estimate if you don't have the values of y, z and m.
 

MrAl

Joined Jun 17, 2014
13,667
I am stuck:
How do I find what x is equal to?

m = z / [(5x/2)(log(y/x))]
Hi,

I think you might be able to solve this using the Lambert W function. Check that out online and see what you can come up with. Part of the solution might look something like:
e^(-W(K))
where K is a constant made from the other variables, and so they would take the place of K.
That's just a rough guess may be more complex than that.

Of course you have to accept using the Lambert W function which may or may not be referred to as a closed solution.

There is also the possibility that there is no solution for some combinations of the other variables.
I am assuming that in this discussion log(x) is the natural log written often as ln(x).

[LATER]
It looks like we can get that equation into this form:
u*log(u)=-1/(5*A*B)

with A, B constants depending on z, m, and y, and
u=x/A

This then should be solvable for u, and of course since A is a constant it should be solvable for x. There may be limits to the solution though so it may only work within some range of the other variables, or maybe starts to result in complex numbers, and also very possible is more than one solution for a given set of the other variables.

If we go with one more lumping we can lump the entire right side into k a constant. That leaves us with:
u*log(u)=k

and I think the solution to this is:
u=e^W(k)

although the range of solutions will still be limited and you'd have to figure out that next.

All that boils down to:
x=y*e^W(k)
where
k=-(2*z)/(5*m*y)
[Note: I updated that formula recently as I made a mistake earlier. It looks right now, but you better verify it just in case I made another mistake, and see how it works also.]

I am not sure how you can find alternate solutions though yet. It could be with the other versions of W(k).

The Lambert W function is usually considered to be closed form, but it's not exactly like a pure algebraic closed form.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,667
Hello again,

I have verified that the solution given in the previous post is correct:
x=y*e^W(k)

with W(k) being the Lambert W function. However, that's just one of the possible solutions.

First, this is one of the most heterogeneous functions I've ever run into with possibly (and that's just possibly) infinite solutions.
To help explain this, which isn't that difficult really, I'd first like to change that lower case 'k' into an upper canse "K' which does not change anything but the variable name itself:
x=y*e^W(K)

Now I can use the lower case k to show the other Lambert W functions that may help with the solutions:
x=y*e^Wk(K)

This can be written differently but I wanted to use the lower case 'k' to indicate the other forms for W(K) because that seems to be the most common. That lower case 'k' can be any integer, like -3, -2, -1, 0, 1, 2, 3, ... etc., and I do not think there is any limit to what that number can be, like -1000 to +1000 or something like that.

When k (again, lower case) is equal to zero:
W0(K)

that is the same as:
W(K)

which is the main branch of this function. That's also the function that works in finding the solutions to some diode circuits.

I should also mention that the original algebraic/log function is unusual in that if a given set of variables is used to calculate 'x',
when 'x' is used in the original function we may get another value for 'm', even though we did not use that 'm' to calculate that 'x' value. This means the function is multivalued.

It is possible that Wk(K) with k=-1 gives one or more additional solutions, or that with k=1 the same, but what would govern this I think would be what the application is. That is, what the original formula is being used for (the one that calculates 'm' from the other variables). If it is used for some physical process, then the valid solutions would be deducted from that. Otherwise there could be infinite solutions, and many of them will be complex.

I had verified that Wk(K) with k=0 works with the original function, but have not verified that for any other value for k (lower case). The function Wk(K) with any k other than 0 is fairly hard to calculate. It involves an integration with a kernel that is made of a log() of several log() functions. There may be simpler functional forms on the web however such as a series solution for any k. That's something to look for.

What all this means is that the original function could be very hard to graph for all of the possible solutions unless we have some physical process to limit what solutions would be considered valid.
 
I am stuck:
How do I find what x is equal to?

m = z / [(5x/2)(log(y/x))]
This equation is tricky because it involves a logarithm. To solve for xxx, you may need to use numerical methods or trial and error, or in some cases, the Lambert W function can help solve such equations, but it’s not straightforward to isolate xxx algebraically in this form.
 

MrAl

Joined Jun 17, 2014
13,667
This equation is tricky because it involves a logarithm. To solve for xxx, you may need to use numerical methods or trial and error, or in some cases, the Lambert W function can help solve such equations, but it’s not straightforward to isolate xxx algebraically in this form.
Hi,

Yes I had explained that earlier, and there are multiple solutions and some are not what we might call commutative. That is, a given value of 'x' produces 'm', but that value of 'm' can produce a different value of 'x'.
For a quick example using random numbers:
If we set x=1 and we solve for 'm' and get a value of 2, then when we set m=2 and solve for 'x' we may not get x=1 as the result even though that led us to m=2.
Not only that, many of the results would be complex, and there could easily be an infinite number of them. Not sure what they would be useful for though, if anything, as Wk() with k=-1 or k=0 or k=1 seem to be the three most important branches for use in finding the solutions.
 
Top