Approximation methods for LDE solutions Copyright © 2004-2008 DigiArea Group . All rights reserved. Description: This worksheet illustrates LdeApprox package capability of doing polynomial approximation of solution of simple LDE. First of all we load LdeApprox package and define simple IVP. Then we use ApproxSol procedure to find 7-th degree polynomial approximation for the IVP solution on interval x = [-h,h]. After that we find exact solution by Maple procedure dsolve . Finally we compare exact and approximate results using Maple procedures plot and plot3d . This loads the package. restart: with(LdeApprox): Examples: This is simple IVP with parameter . ivp:={diff(y(x),x,x)+xi*y(x)=0,y(0)=0,D(y)(0)=1}; 
Finding polynomial approximation of the IVP solution on interval [-h, h]. apr:=ApproxSol(ivp,y(x),x=-h..h,7); 
Finding exact solution of the IVP using Maple function dsolve . sol:=dsolve(ivp,y(x)); 
Comparing exact and approximate results for and  plot(subs({h=Pi/8,xi=1/4},subs(sol,y(x))-subs(apr,y(x))),x=-Pi/8..Pi/8); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/simple10.gif)
Comparing exact and approximate results for using Maple function plot3d plot3d(subs({h=Pi/8},subs(sol,y(x))-subs(apr,y(x))),xi=1/16..2,x=-Pi/8..Pi/8,axes=boxed); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/simple12.gif)
Comparing exact and approximate results for using Maple function plot3d . plot3d(subs({xi=1/4},subs(sol,y(x))-subs(apr,y(x))),x=-h..h,h=-Pi/4..Pi/4,axes=boxed); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/simple14.gif)
Note: This trivial example is just for Web. You can try more complex examples in your computer. |