Numerical polynomial approximation of an LDE solution Copyright © 2004-2009 DigiArea Group . All rights reserved. Description: This worksheet illustrates LdeApprox package capability of doing numerical polynomial approximation of an LDE solution. First of all we load the package and define an IVP. Then we use ApproxSol procedure to find 5-th degree polynomial approximation for the IVP solution on interval x = [0,1]. After that we find exact solution by Maple procedure dsolve . Finally we compare exact and approximate results using Maple procedures plot . This loads the package. restart: with(LdeApprox): Example Initial value problem ivp:={diff(y(x),x,x) = -y(x) - 2*x*diff(y(x),x), y(0) = 0, D(y)(0) = 1}; 
Finding polynomial approximation for solution of the IVP. apr:=ApproxSol(ivp,y(x),x=0..1, 5); 
The exact solution is as follows. sol:=dsolve(ivp,y(x)); 
Comparing exact and approximate results. plot(subs(sol,y(x))-subs(apr,y(x)),x=0..1); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/numeric5.gif)
Note: The example is quite simple (just for Web). You can try more complex examples in your computer. |