Sign in to follow this  

solving equations with log(x) in it

This topic is 4280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Disclaimer: This has absolutely nothing to do with my games, graphics or physics programming and is to do with a computer science honours subject for inductive inference. Also, this is not the entire question only a _very_ small part of it. I have exhausted all my resources at the moment and since i don't have uni until tomorrow morning i would like some assistance from you guys. Thanks for any advice at all. The equation is: 0 = 1/a - 1/2r + Alog(r) + A I need to solve for r. I have tried got to a couple of situations, and every time i end up going around in circles... e.g. log(r) = -1/aA + 1/2rA r = e^(1/aA + 1/2rA) << obviously this is recusive and won't work.... Any help would be muchly appreciated (or a suggestion to a more appropriate forum would be nice too), Thanks Sam.

Share this post


Link to post
Share on other sites
just looking at it...I don't see an explicit solution. I'm not sure it's possible, though I haven't really worked much on it.

Is there some alternative method of solving the general thing you're trying to do? Or maybe an approximation? The function looks like it's easy to implicitly differentiate so there's some options there.

Share this post


Link to post
Share on other sites
I remember a few cases where such equations would appear to be infinitely recursive, but by poking the recursion a couple of layers, you can get it to degenerate into a solvable final result.

There are quite a few values of a and A for which the equation has a solution, which usually (but not always) is a relatively good sign that you can solve it analytically.


I really don't know if any of that is valid in this particular case, though - I poked it for a few minutes and didn't get anything coherent, but that's probably mostly because it's been a couple years since I've done any proper equation solving.

Anyways... best really solid input I can offer is try and push the bounds of that recursion a bit and see if anything sensible shows up. Also, don't forget that you can do a reverse-substitution to simplify things if you need to.

Share this post


Link to post
Share on other sites
Hmm, it seems that the solution to this equation is
r = 2A y(-exp(-1-1/(aA))/2A),

where y(x) is a function, such that: y(x) = z <=> x = z*ez

It seems that the calculation of such a y(x) relies on the solution of the differential equation:
dy/dx = y/(x(1+y))

I guess you'd be better off with numerical methods for this one...

Share this post


Link to post
Share on other sites
Study the function f(r) = c*log(r) - 1/(2*r) and find its inverse.

y = c*log(r) - 1/(2*r)
exp(y) = r^c*exp(-1/(2*r))

let 1/r = u (as long as r is not 0)

exp(y) = u^(-c)*exp(-0.5*u)

y real => both sides positive. Raise both sides of the equation to (1/c):

exp(y/c) = u^(-1)*exp(-0.5*u/c)
exp(-y/c)= u*exp(0.5*u/c)
(1/2c)*exp(-y/c) = (1/2c)*u*exp(u/2c)

Now we can use the Lambert W function:

(1/2c)*u = W[(1/2c)*exp(-y/c)]
u = 2c*W[(1/2c)*exp(-y/c)]

You can get r from u = 1/r.

Share this post


Link to post
Share on other sites
Thread closed. This is schoolwork, without reasonable justification, and therefore against forum policy. Plus, unfortunately the replies were inappropriate for this type of question (which policy states should receive only advice/hints and not answers). Read the Forum FAQ.

Share this post


Link to post
Share on other sites

This topic is 4280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this