Thread: Mathematica program non-coordination between solve function and variable definition?

1. Mathematica program non-coordination between solve function and variable definition?

i wrote a program in which we need to find the values of two variables a and b and then give their sum.But, when i do a+b, it tells
In[60]:= a + b

Out[60]= a + b

what is the problem?

2. Without more code, we canīt say - because we canīt see your screen.

3. Code:
```In[55]:= Solve[{2 a + 3 b == 9, a - 23 b == 16}, {a, b}]

Out[55]= {{a -> 255/49, b -> -(23/49)}}

In[56]:= a + b

Out[56]= a + b```

4. Looks OK to me. I even plugged it into wolframalpha.com, which is there kind of free to the public calculator that supports mathematica syntax.
Code:
`http://www.wolframalpha.com/input/?i=Solve[{2+a+%2B+3+b+%3D%3D+9%2C+a+-+23+b+%3D%3D+16}%2C+{a%2C+b}]`
*had to use code tags because bbcode engine thought this was code...

5. Originally Posted by carrotcake1029
Looks OK to me. I even plugged it into wolframalpha.com, which is there kind of free to the public calculator that supports mathematica syntax.
Code:
`http://www.wolframalpha.com/input/?i=Solve[{2+a+%2B+3+b+%3D%3D+9%2C+a+-+23+b+%3D%3D+16}%2C+{a%2C+b}]`
*had to use code tags because bbcode engine thought this was code...
this is only value of a nd b
now i want to automatically deduce a+b, which is not working becoz it does not consider the values derived from the equations as values of a and b