Message Boards Message Boards

Numerical solutions for an equation with variable parameters?

I am dealing with the energy functional of a given physical system and I want to find the values of x that which makes it extreme. Its expression is given by

E[x_,a_,b_]:=(pi/2)*x^2-(pi/4b)*a*x^2-(pi/2)*a*PolyLog[2,-(1/2b)*x^2]

so when we differentiate it with respect to x, we get

dE[x_,a_,b_]:=pi*x-(pi/2b)*a*x+pi*(a/x)*Log[1+(1/2b)*x^2]

So the problem comes down to finding the values ​​of x that make dE equal to zero. I have tried to use Solve and Reduce, but it hasn't taken me anywhere. For instance, what I have tried so far are things like

Reduce[(1 - a/b)*x^2 + a*Log[1 + x^2/b] == 0, x](*this come from setting dE==0*)

or

 Solve[(1 - a/b)*x^2 + a*Log[1 + x^2/b] == 0, x]

The former takes a lot of time to be computed and I always end up aborting the evaluation while the latter yields the following:

{{x -> -(Sqrt[-b^2 + b a +  b a ProductLog[(E^(-1 + b/a) (b - a))/a]]/Sqrt[b - a])}, {x -> Sqrt[-b^2 + b a + b a ProductLog[(E^(-1 + b/a) (b - a))/a]]/Sqrt[b - a]}}

In principle, I can constrain the range in which the parameters a and b are allowed to vary. Ideally, these would be `

0<a<3.2*10^10 && 0<b<1000

I would really appreciate if someone could give me a hint on how to get these solutions for x.

POSTED BY: Heitor Silva
3 Replies

What do you mean by

output involving the ProductLog function, but how to extract something from it

The ProductLog function accepts a and b as parameters. What do you want to "extract"?

Does this help? Have a look at xx[[2]] as well. 3 and 4 give essentially zero.

tt = ((pi*x - (pi/2 b)*a*x + pi*(a/x)*Log[1 + (1/2 b)*x^2]) x // FullSimplify)
xx = Solve[tt == 0, x] // Flatten
fx = x /. xx[[1]]
Plot3D[{Re[fx], Im[fx]}, {a, .1, 1}, {b, .1, 1},  PlotStyle -> {{Opacity[.5], Blue}, {Opacity[.4], Red}}]
POSTED BY: Hans Dolhaine

What about this?

tt = ((pi*x - (pi/2 b)*a*x + pi*(a/x)*Log[1 + (1/2 b)*x^2]) x //  FullSimplify) /. x^2 -> z
Solve[tt == 0, z]
POSTED BY: Hans Dolhaine

Thanks Hans for your reply and the lines of code provided. Essentially through your approach I end up with the same answer that I got previously, if I'm not letting anything go unnoticed. What I would like to know if it's possible to get symbolical solutions for x depending on the parameters "a" and "b". My ultimate goal is to obtain a phase diagram depending on "a" and "b". Therefore, later on, I would have to calculate second derivatives and evaluate them in the extremes candidates obtained. In all attempts, I always have an output involving the ProductLog function, but how to extract something from it, that's where I get stuck.

POSTED BY: Heitor Silva
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract