<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, passing a parameter for initial condition in to my Dsolve.</title>
    <link>http://www.mapleprimes.com/questions/35633-Passing-A-Parameter-For-Initial-Condition</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sat, 13 Jun 2026 20:45:23 GMT</lastBuildDate>
    <pubDate>Sat, 13 Jun 2026 20:45:23 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, passing a parameter for initial condition in to my Dsolve.</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, passing a parameter for initial condition in to my Dsolve.</title>
      <link>http://www.mapleprimes.com/questions/35633-Passing-A-Parameter-For-Initial-Condition</link>
    </image>
    <item>
      <title>DEtools[DEplot]</title>
      <link>http://www.mapleprimes.com/questions/35633-Passing-A-Parameter-For-Initial-Condition?ref=Feed:MaplePrimes:passing a parameter for initial condition in to my Dsolve.:Comments#answer44530</link>
      <itunes:summary>&lt;p&gt;The following should solve your problem&lt;/p&gt;
&lt;p&gt;&amp;gt; eq:=diff(y(x),x,x)+y(x)^2*x^2=x^2:&lt;br /&gt;
&amp;gt; a:=[-0.6,-0.4,2.4,3.4]:&lt;br /&gt;
&amp;gt; MyColours:=[red,black,blue,green]:&lt;br /&gt;
&amp;gt; MyPlots:=[seq(DEtools[DEplot](eq,y(x),x=0..2,[[y(0)=0,D(y)(0)=a[i]]], linecolor=MyColours[i]),i =1..4)]:&lt;br /&gt;
&amp;gt; plots:-display(MyPlots);&lt;/p&gt;
&lt;p&gt;The DEplot routine will deal with calling dsolve with your equation and initial conditions along with producing your plot that you are looking for.&lt;/p&gt;
&lt;p&gt;Scott&lt;br /&gt;
Application Developer&lt;br /&gt;
Maplesoft&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The following should solve your problem&lt;/p&gt;
&lt;p&gt;&amp;gt; eq:=diff(y(x),x,x)+y(x)^2*x^2=x^2:&lt;br /&gt;
&amp;gt; a:=[-0.6,-0.4,2.4,3.4]:&lt;br /&gt;
&amp;gt; MyColours:=[red,black,blue,green]:&lt;br /&gt;
&amp;gt; MyPlots:=[seq(DEtools[DEplot](eq,y(x),x=0..2,[[y(0)=0,D(y)(0)=a[i]]], linecolor=MyColours[i]),i =1..4)]:&lt;br /&gt;
&amp;gt; plots:-display(MyPlots);&lt;/p&gt;
&lt;p&gt;The DEplot routine will deal with calling dsolve with your equation and initial conditions along with producing your plot that you are looking for.&lt;/p&gt;
&lt;p&gt;Scott&lt;br /&gt;
Application Developer&lt;br /&gt;
Maplesoft&lt;/p&gt;</description>
      <guid>44530</guid>
      <pubDate>Fri, 26 Feb 2010 01:13:40 Z</pubDate>
      <itunes:author>Scott03</itunes:author>
      <author>Scott03</author>
    </item>
    <item>
      <title>Alternatives</title>
      <link>http://www.mapleprimes.com/questions/35633-Passing-A-Parameter-For-Initial-Condition?ref=Feed:MaplePrimes:passing a parameter for initial condition in to my Dsolve.:Comments#answer44531</link>
      <itunes:summary>&lt;p&gt;Here's two alternatives.&lt;/p&gt;
&lt;pre&gt;
eqs := {diff(y(x),x,x)+y(x)^2*x^2=x^2}:
ics := {y(0)=y0, D(y)(0)=dy0}:
integ := dsolve(eqs union ics, numeric, 'parameters'=[y0,dy0]):

Various phase-space plots&lt;/pre&gt;
&lt;pre&gt;
integ('parameters' = [0,0]):
plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);

integ('parameters' = [0,1]):
plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);

&lt;/pre&gt;
&lt;p&gt;Alternative that uses 'initial' to reinitialize the integrator&lt;/p&gt;
&lt;pre&gt;
ics := {y(0)=0, D(y)(0)=0}:
integ := dsolve(eqs union ics, numeric):

plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);

integ('initial'); # this will tell you list order
integ('initial' = [0,0,1]):
plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Here's two alternatives.&lt;/p&gt;
&lt;pre&gt;
eqs := {diff(y(x),x,x)+y(x)^2*x^2=x^2}:
ics := {y(0)=y0, D(y)(0)=dy0}:
integ := dsolve(eqs union ics, numeric, 'parameters'=[y0,dy0]):

Various phase-space plots&lt;/pre&gt;
&lt;pre&gt;
integ('parameters' = [0,0]):
plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);

integ('parameters' = [0,1]):
plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);

&lt;/pre&gt;
&lt;p&gt;Alternative that uses 'initial' to reinitialize the integrator&lt;/p&gt;
&lt;pre&gt;
ics := {y(0)=0, D(y)(0)=0}:
integ := dsolve(eqs union ics, numeric):

plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);

integ('initial'); # this will tell you list order
integ('initial' = [0,0,1]):
plots:-odeplot(integ, [y(x),D(y)(x)], 0..10, 'numpoints'=1000);
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>44531</guid>
      <pubDate>Fri, 26 Feb 2010 10:08:44 Z</pubDate>
      <itunes:author>Joe
 Riel
</itunes:author>
      <author>Joe
 Riel
</author>
    </item>
    <item>
      <title>Yet another way</title>
      <link>http://www.mapleprimes.com/questions/35633-Passing-A-Parameter-For-Initial-Condition?ref=Feed:MaplePrimes:passing a parameter for initial condition in to my Dsolve.:Comments#answer44532</link>
      <itunes:summary>&lt;p&gt;You already got some excellent solutions.&lt;/p&gt;
&lt;p&gt;Here is another.&lt;/p&gt;
&lt;p&gt;eq:=diff(y(x),x,x)+y(x)^2*x^2=x^2;&lt;br /&gt;
a:=[-0.6,-0.4,2.4,3.4];&lt;br /&gt;
sol:=y1-&amp;gt;subs(dsolve({eq,y(0)=0,D(y)(0)=y1},numeric,output=listprocedure),y(x)):&lt;br /&gt;
#sol(y1) is the numerical procedure for evaluating y(x) (with D(y)(0)=y1), so that&lt;br /&gt;
sol(-0.6)(0.12345);&lt;br /&gt;
#will return the value of y(0.12345)&lt;br /&gt;
#and&lt;br /&gt;
plot([seq(sol(a[i]),i=1..4)],0..2);&lt;br /&gt;
# will plot the 4 different solutions in one plot.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You already got some excellent solutions.&lt;/p&gt;
&lt;p&gt;Here is another.&lt;/p&gt;
&lt;p&gt;eq:=diff(y(x),x,x)+y(x)^2*x^2=x^2;&lt;br /&gt;
a:=[-0.6,-0.4,2.4,3.4];&lt;br /&gt;
sol:=y1-&amp;gt;subs(dsolve({eq,y(0)=0,D(y)(0)=y1},numeric,output=listprocedure),y(x)):&lt;br /&gt;
#sol(y1) is the numerical procedure for evaluating y(x) (with D(y)(0)=y1), so that&lt;br /&gt;
sol(-0.6)(0.12345);&lt;br /&gt;
#will return the value of y(0.12345)&lt;br /&gt;
#and&lt;br /&gt;
plot([seq(sol(a[i]),i=1..4)],0..2);&lt;br /&gt;
# will plot the 4 different solutions in one plot.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Preben Alsholm&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;</description>
      <guid>44532</guid>
      <pubDate>Fri, 26 Feb 2010 10:59:08 Z</pubDate>
      <itunes:author>alsholm</itunes:author>
      <author>alsholm</author>
    </item>
    <item>
      <title>Cheers</title>
      <link>http://www.mapleprimes.com/questions/35633-Passing-A-Parameter-For-Initial-Condition?ref=Feed:MaplePrimes:passing a parameter for initial condition in to my Dsolve.:Comments#answer44533</link>
      <itunes:summary>&lt;p&gt;Thanks people,&lt;/p&gt;
&lt;p&gt;Have a good weekend.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Thanks people,&lt;/p&gt;
&lt;p&gt;Have a good weekend.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>44533</guid>
      <pubDate>Fri, 26 Feb 2010 21:03:19 Z</pubDate>
      <itunes:author>Dreamracer</itunes:author>
      <author>Dreamracer</author>
    </item>
  </channel>
</rss>