DE Examples--Higher Order Equations
Higher order, homogeneous and nonhomogeneous, constant coefficient
Here are some Maple commands to assist you in solving higher order, constant coefficient, homogeneous and nonhomogeneous differential equations. The example numbers correspond to the DE Example numbers in the chapter four notes and examples.
Example 1
> | ode1:=diff(y(x),x$2)+2*diff(y(x),x)+5*y(x)=0; |
> | dsolve(ode1,y(x)); |
> | ic:=y(0)=0,D(y)(0)=2; |
> | dsolve({ode1,ic},{y(x)}); |
> | dsolve({ode1,y(0)=0,D(y)(0)=1},y(x)); |
Example 3
> | ode2:={diff(y(x),x,x)-2*diff(y(x),x)-8*y(x)=2*exp(x)-exp(-x)}; |
> | dsolve(ode2); |
Here we put in some initial conditions.
> | ic:={y(0)=0,D(y)(0)=1}; |
> | dsolve(ode2 union ic,y(x)); |
Here is some alternative syntax for solving the same differential equation along with initial conditions.
> | ode2:=diff(y(x),x$2)-2*diff(y(x),x)-8*y(x)=2*exp(x)-exp(-x); |
> | ic2:=y(0)=0,D(y)(0)=1; |
> | dsolve({ode2,ic2},{y(x)}); |
> |
Example 4
> | ode3:=diff(y(x),x,x)-2*diff(y(x),x)-8*y(x)=3*exp(x)-2*exp(-2*x); |
> | dsolve(ode3,y(x)); |
Example 2
> | ode4:=diff(y(x),x$4)+3*diff(y(x),x$3)+2*diff(y(x),x$2)=0; |
> | dsolve(ode4); |
Example 5
> | ode5:=diff(y(x),x$3)-diff(y(x),x$2)=3*exp(x)+sin(x); |
> | dsolve(ode5); |
Example 6
> | ode6:=diff(y(x),x$3)+diff(y(x),x)=3+4*exp(x); |
> | ic6:=y(0)=4,D(y)(0)=5,D(D(y))(0)=1; |
> | dsolve({ode6,ic6},{y(x)}); |
> | dsolve({ode6,ic6},y(x)); |