Message Boards Message Boards

0
|
7199 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Cant solve simple equation. Says it cant with the methods available to Solv

Posted 9 years ago

I'm trying to evaluate a cell that contains the following Eq.:

ClearAll[k,f,M,La,d] Solve[(4fL/d)==((1-M^2)/(kM^2))+(((k+1)/(2k))(Log[((k+1)M^2)/(2+((k-1)*M^2))])),M]/.{f->0.025,L->12.0,d->0.02,k->1.4}

Mathematica 10 returns the following error: "Solve::nsmet: This system cannot be solved with the methods available to Solve."

I checked and it's correctly written. I also tried it in Wolfram Alpha online and it interprets well and solves it, as you can see in this screenshot

enter image description here

POSTED BY: Fabio G
3 Replies

A couple things.

Wolfram Alpha is very helpful in fixing any syntax errors, while Mathematica is not.

You have a couple of typos in the equations you typed in. using kM instead of k M or k*M -- what you have is the single variable kM, instead of the multiplied variables k * M.

Also, I would not use capital letters as variable names, because there might be a conflict with a built-in Mathematica symbol. You also clear the symbol La, while the equation uses L.

I also defined the constants before using Solve[], since I got an error otherwise.

Note that you did this substitution manually when posing the problem to W|A.

In[13]:= ClearAll[k, f, m, l, d] 

In[14]:= f = 0.02
l = 12.0
d = 0.02
k = 1.4

Out[14]= 0.02

Out[15]= 12.

Out[16]= 0.02

Out[17]= 1.4

In[18]:= Solve[(4 f l/
     d) == ((1 - 
       m^2)/(k m^2)) + (((k + 
         1)/(2 k)) (Log[((k + 1) m^2)/(2 + ((k - 1)*m^2))])), m]

Mathematica is busy trying to solve the equation as I type this, and gives no error messages. (There may be no symbolic solution, which is what you asked for with Solve[].)

I would try something besides Solve[], such as Solve[], or FindRoot[]. I suspect that W|A does the same thing in order to give a numerical value so quickly.

Read the documentation.

Posted 9 years ago

I'm sorry, I must have made some mistake editing the post, because variables were being properly multiplied with the " * " symbol in my code.

I used the FindRoot function and it worked. thanks for taking the time to answer!

POSTED BY: Fabio G

Hi Fabio,

I've run into this problem, too. It turns out that the forum software interprets anything between two asterisks as italics. In fact, anything between two sets of double asterisks is bold and anything between two sets of triple asterisks is bold italics.

Eric

POSTED BY: Eric Johnstone
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