Message Boards Message Boards

0
|
3713 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Solve not working

Posted 4 years ago

I am trying to solve the following equation for x, but it is not working at all. What I am doing wrong?

c1 = 1.6*10^(-33)
c2 = 5.23*10^(-27)
eqn = ExpandAll[(c2/2) + ((1/c1)*(((x^2)/4) + c1)^(1/2)) == Log[(x/2 - ((((x^2)/4) + c1)^(1/2)))/((((x^2)/4) + c1 - x/2)^(1/2))]]
Solve[eqn, x]
POSTED BY: Neerav Kaushal
2 Replies
Posted 4 years ago

You should add the domain Reals to Solve, i.e.

Solve[eqn,x,Reals]

Then Solve (as well as NSolve) ends quickly with the correct solution {}, i.e. there is no solution.

Block[{c1, c2, x, eqn},
 c1 = 1.6*10^(-33);
 c2 = 5.23*10^(-27);
 eqn = ExpandAll[(c2/2) + ((1/c1)*(((x^2)/4) + c1)^(1/2)) == 
    Log[(x/2 - ((((x^2)/4) + c1)^(1/2)))/((((x^2)/4) + c1 - x/2)^(1/2))]]; 
 Solve[eqn, x, Reals]
 ]
 {}

You can see this when you take care of the legal real x-domains of the equations left and right side. From the Log-Expression on the right, one can see that:

x/2 > Sqrt[c1 + x^2/4]

must hold. But this is never True for non-negative c1.

I have enhanced your code a bit. One can see there what happens. See the attachment. Set orgVals at will for your or my (somewhat nicer) c1-, c2-Values.

BTW.: If you allow complex values, neither Solve nor DSolve can solve the problem.

Attachments:
POSTED BY: Werner Geiger
Posted 4 years ago

Look at this

c1 = 1.6*10^(-33);
c2 = 5.23*10^(-27);
Table[{x,
  (c2/2) + ((1/c1)*(((x^2)/4) + c1)^(1/2)),
  Log[(x/2 - ((((x^2)/4) + c1)^(1/2)))/((((x^2)/4) + c1 - x/2)^(1/2))]},
  {x,-10,10}]

which returns

{{-10, 3.125*^33, 0.601986402162968 + Pi*I}, 
 {-9, 2.8125*^33, 0.5928118328288697 + Pi*I}, 
 {-8, 2.5*^33, 0.5815754049028404 + Pi*I}, 
 {-7, 2.1875*^33, 0.5674899664194921 + Pi*I}, 
 {-6, 1.875*^33, 0.549306144334055 + Pi*I}, 
 {-5, 1.5625*^33, 0.5249110622493387 + Pi*I}, 
 {-4, 1.25*^33, 0.49041462650586326 + Pi*I}, 
 {-3, 9.375*^32, 0.43773436867694987 + Pi*I}, 
 {-2, 6.25*^32, 0.3465735902799726 + Pi*I}, 
 {-1, 3.125*^32, 0.1438410362258906 + Pi*I}, 
 {0, 2.5*^16, 0. + Pi*I}, 
 {1, 3.125*^32, Indeterminate},
 {2, 6.25*^32, Indeterminate},
 {3, 9.375*^32, Indeterminate}, 
 {4, 1.25*^33, Indeterminate},
 {5, 1.5625*^33, Indeterminate},
 {6, 1.875*^33, Indeterminate}, 
 {7, 2.1875*^33, Indeterminate},
 {8, 2.5*^33, Indeterminate},
 {9, 2.8125*^33, Indeterminate}, 
 {10, 3.125*^33, Indeterminate}}

along with warnings about a division by zero and 0.*ComplexInfinity

POSTED BY: Bill Nelson
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