0
|
5387 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Find all roots in no linear equation?

Posted 9 years ago
 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
Sort By:
Posted 9 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:
Posted 9 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: 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} 
Posted 9 years ago
 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.}