Message Boards Message Boards

0
|
5718 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Find all roots in no linear equation?

Hello,

I am a new user of Mathematica and I have a problem solving a no linear equation: Equations is:

(E^(-2 Sqrt[
  20 - 2 p]) (-2 Sqrt[-(-10 + p) p]
     Sin[Sqrt[2] Sqrt[p]]^2 - (-10 + p) Sin[2 Sqrt[2] Sqrt[p]]))/p

It's a little bit complicated. I try using Solve, and other package to find roots that I found in internet. I know that I can solve it using FindRoot but I want all the possible solution to it.

I try programming a cycle to evaluate point by point but It doesn't work. I traying to solve for p

Can you help me?

Greetings

Luis

3 Replies

NSolve also can.

sol = NSolve[(E^(-2 Sqrt[
           20 - 2 p]) (-2 Sqrt[-(-10 + p) p] Sin[
            Sqrt[2] Sqrt[p]]^2 - (-10 + p) Sin[2 Sqrt[2] Sqrt[p]]))/
     p == 0, p, Reals] // Quiet; p /. sol

Output: {0.81974, 4.9348, 6.94577, 10.}

POSTED BY: Mariusz Iwaniuk
Posted 10 years ago

For this type of non-linear equation, best to use FindRoot as follows:

In[22]:= FindRoot[eq, {p, 1.}]

Out[22]= {p -> 0.81974}

In[25]:= Plot[Evaluate[eq[[1]]], {p, 0, 2}]

The solution is also apparent from the plot: enter image description here

More roots can be found:

In[30]:= eq = (E^(-2 Sqrt[
          20 - 2 p]) (-2 Sqrt[-(-10 + p) p] Sin[
           Sqrt[2] Sqrt[p]]^2 - (-10 + p) Sin[2 Sqrt[2] Sqrt[p]]))/
    p == 0;

In[31]:= FindRoot[Evaluate[eq], {p, 6}]

Out[31]= {p -> 4.9348}

In[32]:= FindRoot[Evaluate[eq], {p, 7.}]

Out[32]= {p -> 6.94577}

enter image description here

POSTED BY: Erik Mahieu
Posted 10 years ago

For this type of non-linear equation, best to use FindRoot as follows:

In[22]:= FindRoot[eq, {p, 1.}]

Out[22]= {p -> 0.81974}

In[25]:= Plot[Evaluate[eq[[1]]], {p, 0, 2}]

The solution is also apparent from the plot: enter image description here

POSTED BY: Erik Mahieu
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