:
Solve[lhs == rhs, x] - lhs == rhs x.
Solve - .
:
NSolve - .
FindRoot - , .
a) DSolve - , y[x] x.
.
In[1]= DSolve[y'[x]==2 a x, y[x], x]
Out[1]= {{y[x]->a x2+c[1]}}
b) NDSolve - .
.
2-
t 0 20 .
In[1]:= NDSolve[{x1'[t] == x2[t],
x2'[t] == x2[t] * (1 - x1[t]^2) - x1[t],
x1[0] == 3.0,x2[0] == 0,5},
{x1[t], x2[t]}, {t, 0,20}]
Out[1]= {{x1[t] -> InterpolatingFunction[{0., 20.}, <>][t],
x2[t] -> InterpolatingFunction[{0., 20.}, <>][t]}}
{{x1[t] -> InterpolatingFunction[{0., 20.}, <>][t],
x2[t] -> InterpolatingFunction[{0., 20.}, <>][t]}}
:
In[2]:= ParametricPlot[Evaluate[{x1[t], x2[t]} /.%], {t, 0, 20}]
Out[2]= -Graphics-
:
In[3]:= Plot[Evaluate[{x1[t], x2[t]} /.%%], {t, 0, 20}]
Out[3]= -Graphics-
lhs rhs . :
expr /.lhs -> rhs,
expr - ; lhs - , ; rhs - , lhs; -> - .
, :
expr /. {lhs1 -> rhs1, lhs2 ->rhs2...}
In[1]:= x + y /. x->3 - x 3
Out[1]= 3 + y
In[2]:= x + y /. {x->a, y->b} - x a, y -
Out[2]= a + b b
expr /.{rules, rules,...} -
In[3]:= x+y /. {{x->1, y->2}, {x->4, y->2}}
Out[3]= {3, 6}
expr//.rules - expr
In[4]:= x^2 + y^6 /. { x->2+a } -
Out[4]= (2 + a)2 + y6
In[5]:= x^2+y^6 //. { x->2+a, a->3 } -
|
|
Out[5] = 25 + y6
: .
In[6]:= rt = Sin[x_]^2 + Cos[x]^2 -> 1;
In[7]:= x - Cos[a x^2 + b x + c]^2 - Sin[a x^2 + b x + c]^2 /. rt
Out[7]= x - 1
Mathematica :
< >[< >]:=< >.
"_". "_" , . . .
?< >.
Clear[< >].
:
In[1]:= f[x_]:= x^2 -
In[2]:= f[a+1] -
Out[2]:=( 1 + a)2
In[3]:= ?f -
Global `f
f[x_]:=x^2