Mathematica Solve complex equation analytically

  • Thread starter Thread starter djymndl07
  • Start date Start date
  • Tags Tags
    solve
AI Thread Summary
The discussion revolves around solving the equation v'[r]=0 analytically for the function v(r) derived from f(r). Participants express skepticism about the analytical solution provided in an article, suggesting it may involve approximations. The problem reduces to a cubic equation, with some users verifying results using Mathematica and others identifying potential errors in their calculations. The consensus indicates that the solution likely involves approximating under specific conditions, leading to a cubic equation that can be solved for r. The conversation highlights the complexity of the problem and the methods used to approach it.
djymndl07
Messages
24
Reaction score
1
I was going through an article. I have the following functions,

$$f(\text{r})\text{=}-\frac{2 M r^2}{g^3+r^3}+\frac{8}{3} \pi P r^2+1$$
$$\text{v}(\text{r})\text{=}\frac{f(r)}{r^2}$$
Now I want to solve v'[r]=0 for r. Clearly This cannot be solved analytically. But there they solved it somehow and got the following result.

$$\text{r}=\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}+\frac{M^2}{\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}}+M$$

Can anyone tell me how can it be solved in mathematica or what method did they use?
Thanks in advance.
 
Last edited:
Physics news on Phys.org
djymndl07 said:
I was going through an article. I have the following functions,

f[r_] := 1 - (2*M*r^2)/(r^3 + g^3) + (8/3)*Pi*P*r^2
v[r_] := f[r]/r^2
Now I want to solve `v'[r]==0` for r. Clearly This cannot be solved analytically. But there they solved it somehow and got the following result.

r = g^3/(2*r^2) + r/2 + (4/3)*(g^3 + r^3)*P*Pi + ((3 + 8*Pi*r^2)^2*(g^3 + r^3)^2)/(36*r^4*\[Xi]^(1/3)) + \[Xi]^(1/3)
Where,

\[Xi] = ((3 + 8*Pi*r^2)^3*(g^3 + r^3)^3)/(216*r^6) + Sqrt[g^6 - (g^3*(3 + 8*Pi*r^2)^3*(g^3 + r^3)^3)/(108*r^6)] - g^3

Can anyone tell me how can it be solved in mathematica or what method did they use?
Thanks in advance.
It's tedious to read and understand your formulas as written. Can you repost them using Latex?
 
renormalize said:
It's tedious to read and understand your formulas as written. Can you repost them using Latex?
Done
 
The result looks like the solution of a cubic. These can be solved analytically, as can quartics.
 
What’s the article?
 
djymndl07 said:
I was going through an article. I have the following functions,

$$f(\text{r})\text{=}-\frac{2 M r^2}{g^3+r^3}+\frac{8}{3} \pi P r^2+1$$
$$\text{v}(\text{r})\text{=}\frac{f(r)}{r^2}$$
Now I want to solve v'[r]=0 for r. Clearly This cannot be solved analytically. But there they solved it somehow and got the following result.

$$\text{r}=\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}+\frac{M^2}{\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}}+M$$

Can anyone tell me how can it be solved in mathematica or what method did they use?
Thanks in advance.
Are you sure Mathematica was right? I* tried to verify it by setting M=g=1 and it didn't work, but I could have made mistakes.

I found that the problem reduces to ## r^6 + 3Mr^5 + 2g^3r^3 + g^6 =0 ##. Again, no guarantee I didn't screw it up.

* plus a bit of ancient MathCad

edit: should be ## r^6 - 3Mr^5 + 2g^3r^3 + g^6 =0 ##
 
Last edited:
DaveE said:
I found that the problem reduces to r6+3Mr5+2g3r3+g6=0. Again, no guarantee I didn't screw it up.
I got a minus sign in front of the second term.
 
Frabjous said:
I got a minus sign in front of the second term.
Yes, you're right.
##r^6-3Mr^5+2g^3r^3+g^6=0##
 
Frabjous said:
What’s the article?
Can I post arxiv link of the article here?
 
  • #10
DaveE said:
Are you sure Mathematica was right? I* tried to verify it by setting M=g=1 and it didn't work, but I could have made mistakes.

I found that the problem reduces to ## r^6 + 3Mr^5 + 2g^3r^3 + g^6 =0 ##. Again, no guarantee I didn't screw it up.

* plus a bit of ancient MathCad

edit: should be ## r^6 - 3Mr^5 + 2g^3r^3 + g^6 =0 ##
Well This is not an exact solution. I think they made some approximation. But still I cant figure out the way they did.
 
  • #11
djymndl07 said:
Can I post arxiv link of the article here?
Yes, that's OK here.
 
  • #12
djymndl07 said:
Well This is not an exact solution. I think they made some approximation. But still I cant figure out the way they did.
Since the solution of ##v^{\prime}\left(r\right)=0## in the particular case ##g=0## is ##r=3M##, I think the author(s) are approximating the general solution for the specific case ##g/\left(3M\right)\ll1## and ##1-r/\left(3M\right)\ll1##, thereby arriving to lowest order at a cubic equation to be solved for ##r##.
 
  • #13
renormalize said:
Since the solution of ##v^{\prime}\left(r\right)=0## in the particular case ##g=0## is ##r=3M##, I think the author(s) are approximating the general solution for the specific case ##g/\left(3M\right)\ll1## and ##1-r/\left(3M\right)\ll1##, thereby arriving to lowest order at a cubic equation to be solved for ##r##.
Thanks, I will try this.
 
  • #14
  • #15
djymndl07 said:
Lookk at equations 7,8,16,17 in Shadow thermodynamics
I'm not seeing how eqs.(7,8,16) in this reference lead to the first 2 equations in your post #1. Can you post your derivation?
 
  • #16
renormalize said:
I'm not seeing how eqs.(7,8,16) in this reference lead to the first 2 equations in your post #1. Can you post your derivation?
There is a typo in equation 16. The correct expression will be, ##f(r)=h(r)##. Now using this in equation 7 and taking E=0, L=1 leads to Second equation of my post.
 
  • #17
djymndl07 said:
There is a typo in equation 16. The correct expression will be, ##f(r)=h(r)##. Now using this in equation 7 and taking E=0, L=1 leads to Second equation of my post.
Can you motivate why you set the photon energy ##E=0##? Does eq.(17) in your reference require this condition?
 
  • #18
Yes there are plenty of papers where they did so.... E and L are arbitrary constants. The physical importance does not change from such choices. Its for simplification purpose.
 
  • #19
OK, it turns out that eq.(17) in your reference is the immediate result of a simple approximation.
Your original equations:$$f\left(r\right)\text{=}-\frac{2Mr^{2}}{g^{3}+r^{3}}+\frac{8}{3}\pi Pr^{2}+1,\quad v\left(r\right)=\frac{f(r)}{r^{2}},\quad\left.v^{\prime}\left(r\right)\right|_{r=r_{p}}=0\tag{1a,b,c}$$
Calculating (1c) gives:$$0=\frac{6Mr_{p}^{2}}{\left(g^{3}+r_{p}^{3}\right)^{2}}-\frac{2}{r_{p}^{3}}\;\Rightarrow\;0=r_{p}^{3}-3Mr_{p}^{2}+g^{3}\left(2+\frac{g^{3}}{r_{p}^{3}}\right)\approx r_{p}^{3}-3Mr_{p}^{2}+2g^{3}\;\text{for}\;\frac{g^{3}}{r_{p}^{3}}\ll1$$and, per Mathematica, the only real solution of the cubic ##r_{p}^{3}-3Mr_{p}^{2}+2g^{3}=0## is:
$$r_p=\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}+\frac{M^2}{\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}}+M$$i.e., eq. (17).
(Edited to correct exponent from 3 to 2 in ##6Mr_{p}^{2}## term.)
 
Last edited:
  • #20
renormalize said:
OK, it turns out that eq.(17) in your reference is the immediate result of a simple approximation.
Your original equations:$$f\left(r\right)\text{=}-\frac{2Mr^{2}}{g^{3}+r^{3}}+\frac{8}{3}\pi Pr^{2}+1,\quad v\left(r\right)=\frac{f(r)}{r^{2}},\quad\left.v^{\prime}\left(r\right)\right|_{r=r_{p}}=0\tag{1a,b,c}$$
Calculating (1c) gives:$$0=\frac{6Mr_{p}^{3}}{\left(g^{3}+r_{p}^{3}\right)^{2}}-\frac{2}{r_{p}^{3}}\;\Rightarrow\;0=r_{p}^{3}-3Mr_{p}^{2}+g^{3}\left(2+\frac{g^{3}}{r_{p}^{3}}\right)\approx r_{p}^{3}-3Mr_{p}^{2}+2g^{3}\;\text{for}\;\frac{g^{3}}{r_{p}^{3}}\ll1$$and, per Mathematica, the only real solution of the cubic ##r_{p}^{3}-3Mr_{p}^{2}+2g^{3}=0## is:
$$r_p=\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}+\frac{M^2}{\sqrt[3]{-g^3+\sqrt{g^6-2 g^3 M^3}+M^3}}+M$$i.e., eq. (17).
Thanks a lot
 

Similar threads

Replies
2
Views
2K
Replies
2
Views
1K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
9
Views
2K
Replies
2
Views
3K
Back
Top