Question: passing a parameter for initial condition in to my Dsolve.

Hi,

I would like to know how to pass my list of initial conditions "a" in to my solutions via some form of index to generate plots for each of my initial conditions. I have indexed in the code but need some form of related calling procedure.

 

Thanks in advance.

 

>restart;

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


> a:=[-0.6,-0.4,2.4,3.4];


> ics[1]:=y(0)=0,D(y)(0)=a[1];


> sol[1]:=dsolve({eq,ics[1]},numeric);


> fy[1]:=x0->eval(y(x),sol[1](x0));


> plot(fy[1],0..2);
 

 

Please Wait...