Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Simple math' topicStudent Support Forum > General > Archives > "Simple math"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
02/28/13 11:21am

In[1]:= b=5;
c=10;
Solve[c==a+b,a]

Out[3]= {{a->5}}

Notice the difference between = and == in that.

When you know there is only one solution and you want just the number then modify slightly

In[4]:= b=5;
c=10;
a/.Solve[c==a+b,a][[1]]

Out[6]= 5

Or even

In[7]:= b=5;
c=10;
a=a/.Solve[c==a+b,a][[1]]

Out[9]= 5

And a now has the value 5

URL: ,

Subject (listing for 'Simple math')
Author Date Posted
Simple math Thue 02/27/13 10:27am
Re: Simple math Bill Simpson 02/28/13 11:21am
< Previous CommentHelp | Reply To Comment | Reply To Topic