Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Cant solve this equation numerically' topicStudent Support Forum > General > Archives > "Cant solve this equation numerically"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
01/23/13 12:21pm

Eliminate those "_", those mean something very different from what you think and cannot be used the way you are using them.

Use ";" between statements in a single cell to avoid even more confusing problems in the future. Sometimes you can get by without doing that, but it is a bad practice.

In[1]:= Atwo=5;Aone=5;Athree=5; Bone=5;Btwo=5;Bthree=5; Cone=5;Ctwo=5;Cthree=5; Done=5;Dtwo=5;Dthree=5;

Change the syntax you use for Solve.

Solve[k== -(-Atwo Cthree Done+Athree Ctwo Done+Atwo Cone Dthree-Aone Ctwo Dthree-Athree Cone Dtwo+Aone Cthree Dtwo)/(Btwo Cthree Done-Bthree Ctwo Done-Btwo Cone Dthree+Bone Ctwo Dthree+Bthree Cone Dtwo-Bone Cthree Dtwo),k]

From In[1]:= Power::infy: Infinite expression 1/0 encountered.

Out[2]= {}

Which is because your denominator is zero.

In[3]:= (Btwo Cthree Done-Bthree Ctwo Done-Btwo Cone Dthree+Bone Ctwo Dthree+Bthree Cone Dtwo-Bone Cthree Dtwo)

Out[3]= 0

Add 1 to your numerator and denominator just to show that it works

In[4]:= Solve[k== -(-Atwo Cthree Done+Athree Ctwo Done+Atwo Cone Dthree-Aone Ctwo Dthree-Athree Cone Dtwo+Aone Cthree Dtwo+1)/(Btwo Cthree Done-Bthree Ctwo Done-Btwo Cone Dthree+Bone Ctwo Dthree+Bthree Cone Dtwo-Bone Cthree Dtwo+1),k]

Out[4]=
{{k-> -1}}

Or in this case your expression is simple enough that you don't even need to use Solve.

In[5]:= -(-Atwo Cthree Done+Athree Ctwo Done+Atwo Cone Dthree-Aone Ctwo Dthree-Athree Cone Dtwo+Aone Cthree Dtwo+1)/(Btwo Cthree Done-Bthree Ctwo Done-Btwo Cone Dthree+Bone Ctwo Dthree+Bthree Cone Dtwo-Bone Cthree Dtwo+1)

Out[5]= -1

Note: Attaching small simplified notebooks, rather than screenshot images that just require someone else to type it all back in again to verify the answer is correct and really works, is almost always better.

URL: ,

Subject (listing for 'Cant solve this equation numerically')
Author Date Posted
Cant solve this equation numerically David 01/23/13 08:35am
Re: Cant solve this equation numerically Bill Simpson 01/23/13 12:21pm
< Previous CommentHelp | Reply To Comment | Reply To Topic