Solving Equations
Here is the quadratic equation in Mathematica TE.
In[1]:= x^2 - 7 x + 3 a == 0
Out[1]=
This solves the equation on the previous line, represented by %. The two solutions are given in terms of the parameter .
In[2]:= Solve[ %, x ]
Out[2]=
Here is the solution to a simple set of simultaneous equations.
In[3]:= Solve[ { a x + b y == 0, x + y == c } , {x, y} ]
Out[3]=
NSolve finds numerically the five complex solutions to this fifth-order algebraic equation.
In[4]:= NSolve[ x^5 + 2 x + 1 == 0, x ]
Out[4]=
FindRoot allows you to solve transcendental equations numerically. This gives the solution to a pair of simultaneous equations near , .
In[5]:= FindRoot[ { Sin[x] == x - y, Cos[y] == x + y },
{x, 1}, {y, 0} ]
Out[5]=
Mathematica TE can also solve differential equations. Here is the closed-form solution for .
In[6]:= DSolve[y''[x] - k y[x] == 1, y[x], x]
Out[6]=