Boundary value problem Copyright © 2004-2008 DigiArea Group . All rights reserved. Description: This worksheet illustrates LdeApprox package capability of working with boundary value problems. First of all we load LdeApprox package and define a BVP. Then we use ApproxSol procedure to find 3-rd degree polynomial approximation for the BVP 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 and plot3d. This loads the package. restart: with(LdeApprox): Example Define simple BVP with one parameter. bvp:={diff(y(x),x,x)+lambda*x*diff(y(x),x)+lambda^2*y(x) = 0,y(0)=0,y(1)=lambda}; 
Finding 3-rd degree polynomial approximation for the BVP solution on interval x = [0,1]. apr:=ApproxSol(bvp, y(x), x=0..1, 3); 
Finding exact solution of the BVP using Maple function dsolve . sol:=dsolve(bvp, y(x)); 
Comparing exact and approximate results. plot3d(subs(sol,y(x))-subs(apr,y(x)),lambda=-1/4..1/4,x=0..1,axes=boxed,orientation=[50,50]); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/bvp7.gif)
Comparing exact and approximate results for  plot(subs(lambda=1/32,subs(sol,y(x))-subs(apr,y(x))),x=0..1); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/bvp9.gif)
Note: The method applied in the package is numerically - analytical one. It means that you can use symbolic expressions as boundary conditions, interval of approximation etc. However these kind of examples leads to huge output so its not for Web. This reason force us to introduce simple example with one parameter only. You can try more complex examples in your computer. |