Re: Differential Equation

*To*: mathgroup at smc.vnet.net*Subject*: [mg85737] Re: Differential Equation*From*: Valeri Astanoff <astanoff at gmail.com>*Date*: Wed, 20 Feb 2008 07:03:02 -0500 (EST)*References*: <fp0la8$5ia$1@smc.vnet.net>

On 14 f=E9v, 06:58, "Sergio Miguel Terrazas Porras" <sterr... at uacj.mx> wrote: > Hi, I do not know what happened when pasting the command from Mathematica > =A0to the email message. > The command was correctly formed. The x2 is supposed to be x-squared (Power[x,2]) and the S was the double equal sign. > > I retype the command here: > > DSolve[(Power[x,2]-1)*D[y[x],{x,2}]==D[y[x],x]-Power[x,2]*y[x],y[x],x] > > Thank you, and by the way, I did not type the nonsense about the email being confidencial. Maybe OutLook did. > > > > -----Original Message----- > From: Jens-Peer Kuska [mailto:ku... at informatik.uni-leipzig.de] > Sent: Wednesday, February 13, 2008 12:57 PM > Subject: [ Spam ] =A0Re: Differential Equation > > Importance: Low > > Hi, > > and what is SD[] ?? and is x2 eventual x^2 > Can you please post valid Mathematica syntax > or did you expect you find an analytical solution > with DSolve[] to an ode with an unknown functional > SD[y[x],x] ?? > > And posting to a public news group with > "This email and any files transmitted with it are confidential" > is nonsense. > > Regards > =A0 =A0Jens > > Sergio Miguel Terrazas Porras wrote: > > Hello: > > > I was trying to solve the following second order linear differential equation and got no result from Mathematica. > > > DSolve[(x2-1)*D[y[x],{x,2}]SD[y[x],x]-x2*y[x],y[x],x] > > > Any ideas? > > > Thanks, > > > Sergio Terrazas > > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed . If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not dissemi nate, distribute or copy this e-mail.- Masquer le texte des messages prE9c= =E9dents - > > - Afficher le texte des messages pr=E9c=E9dents - Good day, For x between -1 and 1 you can use a method a la Frobenius to get a power series expansion. Here is an example with y[0]=0 and y'[0]=1 : In[1]:= ex = (x^2-1)*y''[x] + x^2*y[x] - y'[x]; In[2]:= y[x_]=Sum[a[k]x^k,{k,0,10}]; cc=CoefficientList[ex ,x] Out[3]= {0, 0, -(3/2) - 12*a[4], 2 - 4*a[4] - 20*a[5], -1/2 + 12*a[4] - 5*a[5] - 30*a[6], 1/6 + 20*a[5] - 6*a[6] - 42*a[7], a[4] + 30*a[6] - 7*a[7] - 56*a[8], a[5] + 42*a[7] - 8*a[8] - 72*a[9], a[6] + 56*a[8] - 9*a[9] - 90*a[10], a[7] + 72*a[9] - 10*a[10], a[8] + 90*a[10], a[9], a[10]} Coefficients 12 20 30 42... are of the form n(n+1) In[4]:= Solve[a[n]+(n+1)(n+2)a[n+2]-(n+3)a[n+3]-(n+3)(n+4)a[n +4]==0 /. n ->n-4,a[n]] //Simplify Out[4]= {{a[n] -> (a[n-4] + (6-5*n+n^2)*a[n-2] - (n-1)*a[n-1])/((n-1)*n)}} (unfortunately the recursion can't be solved with RSolve) In[18]:= ClearAll[y]; so=Solve[ex==0&&D[ex,x]==0,{y''[x],y'''[x]}]/.x->0//First {y'''[0] -> y'[0], y''[0] -> -y'[0]} In[7]:= dd=(Series[y[x],{x,0,3}]//Normal// CoefficientList[#,x]& )/.so /. y[0]->0 /. y'[0]->1 Out[7]= {0, 1, -(1/2), 1/6} In[8]:= ClearAll[a];{a[0],a[1],a[2],a[3]}=dd; In[9]:= aa=Solve[Thread[cc[[3;;4]]==dd[[3;;4]]],{a[4],a[5]}]//First;= ClearAll[b]; b[0]=a[0]; b[1]=a[1]; b[2]=a[2]/.aa; b[3]=a[3]/.aa; b[n_ /; n > 3] := b[n] = (b[n-4] + (6-5*n+n^2)*b[n-2] - (n-1)*b[n-1]) / ((n-1)*n); In[12]:= g[x_]=Sum[b[k]x^k,{k,0,10}] ; Let's compare with NDSolve In[13]:= f[x_]=y[x]/.NDSolve[y[0]==0&&y'[0]==1&&ex==0,y[x],{= x,-1,1}]// First During evaluation of In[13]:= NDSolve::ndsz: At x == -1., step size is effectively zero; singularity or stiff system suspected. >> Out[13]= InterpolatingFunction[{{-1.,1.}},<>][x] In[14]:= Plot[{f[x], g[x]},{x,-1,1}] Fitting seems quite good on the plot Here are the first terms at order 10 : In[15]:= g[x] Out[15]= x - x^2/2 + x^3/6 - x^4/8 + x^5/8 - 7*x^6/80 + 383*x^7/5040 - 2363*x^8/40320 + 19079*x^9/362880 - 3443*x^10/80640 hth V.Astanoff