First Order Equations
Solutions ToWeb Site Examples
Here are some Maple solutions to web site Exam I examples 1-9.
Example 1
> | ode1:=diff(y(x),x)=y(x)*cos(x); |
> | dsolve(ode1,{y(x)}); |
> | dsolve({ode1,y(0)=1},{y(x)}); |
Example 2
> | ode2:=diff(y(x),x)=-x/y(x); |
> | dsolve(ode2,{y(x)}); |
> | dsolve({ode2,y(0)=r},{y(x)}); |
Example 3
> | ode3:=diff(y(x),x)=0.01*y(x)*(100-y(x)); |
> | dsolve(ode3,{y(x)}); |
> | dsolve({ode3,y(0)=10},{y(x)}); |
> | f:=rhs(%); |
> | with(plots): |
Warning, the name changecoords has been redefined
> | plot(f,x=0..20,y=-10..110); |
Example 4
> | ode4:=diff(y(x),x)=(y(x)-1)^2-0.01; |
> | dsolve(ode4,{y(x)}); |
> | dsolve({ode4,y(0)=1},{y(x)}); |
Example 5
> |
> | ode5:=diff(y(x),x)=y(x)*x*sin(x); |
> | dsolve(ode5,{y(x)}); |
> | dsolve({ode5,y(0)=1},{y(x)}); |
> | dsolve({ode5,y(0)=-1},{y(x)}); |
> | f:=rhs(%); |
> | plot(f,x=0..10,y=-25..10); |
Example 6
> | ode6:=diff(y(x),x)=y(x)/x+(y(x)/x)^2; |
> | dsolve(ode6,{y(x)}); |
> | dsolve({ode6,y(1)=2},{y(x)}); |
> | dsolve({ode6,y(1)=1},{y(x)}); |
> | f:=rhs(%); |
> | plot(f,x=1..13,y=-25..25); |
Example 7
> | ode7:=diff(y(x),x)=(y(x)*exp(-x)-sin(x))/(exp(-x)+2*y(x)); |
> | dsolve(ode7,{y(x)}); |
> | dsolve({ode7,y(0)=-1},{y(x)}); |
> | dsolve({ode7,y(0)=1},{y(x)}); |
> | f:=rhs(%); |
> | plot(f,x=0..20,y=-1..2); |
> | dsolve({ode7,y(0)=-1/2},{y(x)}); |
Example 8
> | ode8:=diff(y(x),x)=(2*y(x)*sin(x)-3)/cos(x); |
> | dsolve(ode8,{y(x)}); |
> | dsolve({ode8,y(0)=1},{y(x)}); |
> | dsolve({ode8,y(0)=3},{y(x)}); |
> | f:=rhs(%); |
> | plot(f,x=0..4*Pi,y=-2..10); |
> | dsolve({ode8,y(0)=-3},{y(x)}); |
> | f:=rhs(%); |
> | plot(f,x=0..4*Pi,y=-10..2); |
Example 9
> | ode9:=diff(y(x),x)=2*y(x)/x+(x^2)*sin(3*x); |
> | dsolve(ode9,{y(x)}); |
> | dsolve({ode9,y(Pi/2)=2},{y(x)}); |
> | f:=rhs(%); |
> | soln2:=plot(f,x=Pi/2..8,y=-10..70,color=red): |
> | dsolve({ode9,y(Pi/2)=1},{y(x)}); |
> | g:=rhs(%); |
> | soln1:=plot(g,x=Pi/2..8,y=-10..70,color=blue): |
> | display(soln1,soln2); |
> |