-
Solve :
Input (typing twice prime for y’’):
desolve(y’’+y=cos(x),y)
or input :
desolve((diff(diff(y))+y)=(cos(x)),y)
Output :
c_0*cos(x)+(x+2*c_1)*sin(x)/2
c_0, c_1 are the constants of integration : y(0)=c_0 and
y’(0)=c_1.
If the variable is not x but t, input :
desolve(derive(derive(y(t),t),t)+y(t)=cos(t),t,y)
Output :
c_0*cos(t)+(t+2*c_1)/2*sin(t)
c_0, c_1 are the constants of integration : y(0)=c_0 and
y’(0)=c_1.
- Solve :
Input :
desolve([y’’+y=cos(x),y(0)=1],y)
Output :
[cos(x)+(x+2*c_1)/2*sin(x)]
the components of this vector are solutions (here there is just one component,
so we have just one solution depending of the constant c_1).
- Solve :
Input :
desolve([y’’+y=cos(x),y(0)^
2=1],y)
Output :
[-cos(x)+(x+2*c_1)/2*sin(x),cos(x)+(x+2*c_1)/2*sin(x)]
each component of this list is a solution,
we have two solutions depending
on the constant c_1 (y′(0)=c1)
and corresponding to y(0)=1 and to y(0)=−1.
- Solve :
y″+y=cos(x), (y(0))2=1 y′(0)=1 |
Input :
desolve([y’’+y=cos(x),y(0)^
2=1,y’(0)=1],y)
Output :
[-cos(x)+(x+2)/2*sin(x),cos(x)+(x+2)/2*sin(x)]
each component of this list is a solutions (we have two solutions).
- Solve :
Input :
desolve(y’’+2*y’+y=0,y)
Output :
(x*c_0+x*c_1+c_0)*exp(-x)
the solution depends of 2 constants of integration :
c_0, c_1 (y(0)=c_0 and y’(0)=c_1).
- Solve :
Input:
desolve(y’’-6*y’+9*y=(x*exp(3*x),y)
Output :
(x^
3+(-(18*x))*c_0+6*x*c_1+6*c_0)*1/6*exp(3*x)
the solution depends on 2 constants of integration :
c_0, c_1 (y(0)=c_0 and y’(0)=c_1).