Increasing precision of second order boundary value problem

조회 수: 4 (최근 30일)
bahadir turkyilmaz
bahadir turkyilmaz . 2020년 8월 11일
편집: Are Mjaavatten . 2020년 8월 11일
Hello, I have one differential boundary value problem.
and f(0)=0 , f(1)=e
I compare numerical solution by matlab (purple line in graphs) and solution obtained by matched asymptotic expansion (yellow stars in graphs). The following graphs are for same solution, in fact second one zoomed version of first one. As it can be seen in graphs in lower booundary solutions are not matching.
The code I used is:
clear all
xmesh = linspace(0,1,100000);
x_dev= linspace(0,1,5000)
solinit = bvpinit(xmesh, @guess);
options = bvpset('AbsTol',10e-6)
sol = bvp5c(@bvpfcn, @bcfcn, solinit,options);
function dydx = bvpfcn(x,y)
eps=0.0005 ;
dydx = zeros(2,1);
dydx = [y(2)
function res = bcfcn(ya,yb)
res = [ya(1)
function g = guess(x)
How can I improve solution obtained by bvp5c in the lower boundary?

답변 (1개)

Are Mjaavatten
Are Mjaavatten 2020년 8월 11일
편집: Are Mjaavatten 님. 2020년 8월 11일
Your asymptotic expansion solution seems to have zero slope at y = 0. This implies that the second derivative is zero and the solution is f(y) = 0 for all y >= 0. So it seems that the asymptotic expansion solution is incorrect
Solving your equation as an initial value problem with inital values taken fromthe bvp5c solution recreates that solution. You can verify this by adding the following lines at the end of your code:
[t,z] = ode45(@bvpfcn,[0,1],sol.y(:,1));


Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by