Homogeneous boundary value problem Copyright © 2004-2009 DigiArea Group . All rights reserved. Description: This worksheet illustrates LdeApprox package capability of working with homogeneous boundary value problems. First of all we load LdeApprox package and define homogeneous BVP. Then we use ApproxSol procedure to find symbolic 3-rd degree polynomial approximation and numeric 5-rd degree polynomial approximation for the BVP solution on interval . After that we find exact solution by Maple procedure dsolve . Finally we compare exact and approximate results using Maple procedure plot. This loads the package. restart: with(LdeApprox): Examples: This is a simple homogeneous BVP. bvp:={diff(y(x),x,x)+lambda*y(x)=0,y(0)=0,y(Pi)=0}; 
Using ApproxSol procedure to find symbolic 3-rd degree polynomial approximation ( exact option is true by default). As the BVP is homogeneous one we specify eigen value variable. If the variable is not specified then ApproxSol procedure tries to determine it automatically: apr:=ApproxSol(bvp, y(x), x=0..Pi, 3, eigenvalue=lambda); ![apr := [[lambda = 16/Pi^4*(10*Pi^2+2*22^(1/2)*Pi^2), y(x) = _C1*(1+16/Pi*(-5+22^(1/2))*x-16/Pi^2*(-5+22^(1/2))*x^2)], [lambda = 16/Pi^4*(10*Pi^2-2*22^(1/2)*Pi^2), y(x) = _C1*(1-16/Pi*(5+22^(1/2))*x+16/...](prod/LdeApproxMaple/examples/images/hombvp8.gif)
Using ApproxSol procedure to find numeric 5-rd degree polynomial approximation of solutions of the BVP (eigen value variable is not specified): apr:=ApproxSol(bvp, y(x), x=0..Pi, 5, exact=false);
Warning, No eigenvalue variable specified. Trying to determine ...
Warning, lambda - is the eigenvalue variable.
![apr := [[lambda = .9999976748, y(x) = _C1*(-.4035965587e-3-.6924624700*x-.3414822225e-1*x^2+.1620616675*x^3-.2579291545e-1*x^4-.1966521685e-11*x^5)], [lambda = 4.000401299, y(x) = _C1*(.1382008172e-2+....](prod/LdeApproxMaple/examples/images/hombvp16.gif)
Normalizing the result to compare it with the exact solution. apr1:=Normalize(apr,x = 0..Pi); ![apr1 := [[lambda = .9999976748, y(x) = .4588995717e-3+.7873474737*x+.3882739886e-1*x^2-.1842682456*x^3+.2932720212e-1*x^4+.2234239006e-11*x^5], [lambda = 4.000401299, y(x) = .4856832523e-2+1.444420230*...](prod/LdeApproxMaple/examples/images/hombvp23.gif)
The exact solution is as follows: sol:=dsolve({diff(y(x),x,x)+lambda*y(x)=0,y(0)=0},y(x)); 
This is the normalized exact solution. sol1:=radsimp(Normalize(sol,x = 0..Pi)); 
Now one can compare the results. For plot(subs({lambda=1},subs(sol1,y(x))-subs(apr1[1],y(x))),x=0..Pi); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/hombvp27.gif)
Eigenvalue precision: delta[lambda]=1-subs(apr1[1],lambda); ![delta[lambda] = .23252e-5](prod/LdeApproxMaple/examples/images/hombvp28.gif)
For  plot(subs({lambda=4},subs(sol1,y(x))-subs(apr1[2],y(x))),x=0..Pi); ![[Maple Plot]](prod/LdeApproxMaple/examples/images/hombvp30.gif)
Eigenvalue precision: delta[lambda]=4-subs(apr1[2],lambda); ![delta[lambda] = -.401299e-3](prod/LdeApproxMaple/examples/images/hombvp31.gif)
Note: The method applied in the package is a 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. |