MapleDEfirstOrder2.mws

First Order Equations

Solutions ToWeb Site Examples

Here are some Maple solutions to web site Exam I examples 11-14, 16.

>    with(plots):

Example 11

>    ode11:=diff(y(x),x)=y(x)+x*y(x)^2;

ode11 := diff(y(x),x) = y(x)+x*y(x)^2

>    dsolve(ode11,{y(x)});

y(x) = -1/(x-1-exp(-x)*_C1)

>    dsolve({ode11,y(0)=-2},{y(x)});

y(x) = -1/(x-1+3/2*exp(-x))

>    f:=rhs(%);

f := -1/(x-1+3/2*exp(-x))

>    soln1:=plot(f,x=-5..5,y=-10..10,color=red):

>    dsolve({ode11,y(0)=2},{y(x)});

y(x) = -1/(x-1+1/2*exp(-x))

>    g:=rhs(%);

g := -1/(x-1+1/2*exp(-x))

>    soln2:=plot(g,x=-5..5,y=-10..10,color=blue):

>    display(soln1,soln2);

[Maple Plot]

Example 12

>    ode12:=diff(y(x),x)=2*x*y(x)+(1/x)*y(x)*ln(y(x));

ode12 := diff(y(x),x) = 2*x*y(x)+1/x*y(x)*ln(y(x))

>    dsolve(ode12,{y(x)});

y(x) = exp(x^2)^2*exp(_C1*x)

>    dsolve({ode12,y(1)=1},{y(x)});

y(x) = exp(x^2)^2*exp(-2*x)

>    f:=rhs(%);

f := exp(x^2)^2*exp(-2*x)

>    soln3:=plot(f,x=1..2.2,y=0..40,color=red):

>    dsolve({ode12,y(1)=5},{y(x)});

y(x) = exp(x^2)^2*exp((ln(5)-2)*x)

>    g:=rhs(%);

g := exp(x^2)^2*exp((ln(5)-2)*x)

>    soln4:=plot(g,x=1..2.2,y=0..40,color=blue):

>    display(soln3,soln4);

[Maple Plot]

Example 13

>    ode3:=diff(y(x),x)=(1-x-y(x))/(x+y(x));

ode3 := diff(y(x),x) = (1-x-y(x))/(x+y(x))

>    dsolve(ode3,{y(x)});

y(x) = -x+(2*x-2*_C1)^(1/2), y(x) = -x-(2*x-2*_C1)^(1/2)

>    dsolve({ode3,y(0)=10},{y(x)});

y(x) = -x+(2*x+100)^(1/2)

>    f:=rhs(%);

f := -x+(2*x+100)^(1/2)

>    plot(f,x=0..50,y=-50..20);

[Maple Plot]

>    dsolve({ode3,y(0)=-10},{y(x)});

y(x) = -x-(2*x+100)^(1/2)

>    g:=rhs(%);

g := -x-(2*x+100)^(1/2)

>    plot(g,x=0..50,y=-70..10);

[Maple Plot]

Example 14

>   

>    ode14:=diff(y(x),x)=y(x)/(x+x*ln(y(x))-x*ln(x));

ode14 := diff(y(x),x) = y(x)/(x+x*ln(y(x))-x*ln(x))

>    dsolve(ode14,{y(x)});

y(x) = _C1/LambertW(_C1/x)

>    dsolve({ode14,y(1)=exp(1)},{y(x)});

y(x) = exp(1)/LambertW(exp(1)/x)

>    f:=rhs(%);

f := exp(1)/LambertW(exp(1)/x)

>    plot(f,x=1..21,y=0..20);

[Maple Plot]

Example 16

>    ode16:=diff(s(t),t)=9-3*s(t)/50;

ode16 := diff(s(t),t) = 9-3/50*s(t)

>    dsolve(ode16,{s(t)});

s(t) = 150+exp(-3/50*t)*_C1

>    dsolve({ode16,s(0)=100},{s(t)});

s(t) = 150-50*exp(-3/50*t)

>    dsolve({ode16,s(0)=10},{s(t)});

s(t) = 150-140*exp(-3/50*t)

>    f:=rhs(%);

f := 150-140*exp(-3/50*t)

>    p1:=plot(f,t=0..100,color=red,labels=[t,s]):

>    p2:=plot(150,t=0..100,color=blue,labels=[t,s]):

>    display(p1,p2);

[Maple Plot]

>