MATH3242 - FW03

Assignment 4

Question 8

> ode1:=diff(y(x),x)=y(x)*(3-y(x));

> xarray:=array([evalf(i/4)\$i=1..16]);

> dsolve({ode1,y(0)=1},y(x),numeric,value=xarray);

> dsolve({ode1,y(0)=2},y(x),numeric,value=xarray);

> dsolve({ode1,y(0)=3},y(x),numeric,value=xarray);

> dsolve({ode1,y(0)=4},y(x),numeric,value=xarray);

> dsolve({ode1,y(0)=5},y(x),numeric,value=xarray);

Note that if the initial condition is less than 3 the solution increases monotonically towards 3.

If the initial condition is 3, the solution remains at this value for all x.

If the initial condition is greater than 3 the solution decreases monotonically towards 3.

Question 9(a)

> ode2:=diff(y(x),x,x)-diff(y(x),x)/x+2*x*y(x)=sin(x);

> xarray2:=array([evalf(1+i/10)\$i=1..10]);

> dsolve({ode2,y(1)=2,D(y)(1)=-1},y(x),numeric,value=xarray2);

Question 9(b)

> ode3:=diff(y(x),x,x)+cos(x)*diff(y(x),x)+x*sin(x)*y(x) = cot(x);

> xarray3:=array([evalf(1+i/10)\$i=1..20]);

> dsolve({ode3,y(1)=0.5,D(y)(1)=1.2},y(x),numeric,value=xarray3);

>