Exercise 10.5.7
The following nonlinear BVP was proposed by Carrier:
ϵu″
In order to balance the different components of the residual, it’s best to implement the boundary condition numerically as u/\epsilon = 0.
Use
bvp
to solve the problem with \epsilon = 0.003, n=200, and an initial estimate of all zeros. Plot the result; you should get a solution with 9 local maxima.Starting with result of (a) continue the parameter sequence of \epsilon using most recent solution as initialization for the next value. Plot end result for \epsilon = 0.3.
domain = [-1,1];
epsilon = 0.003;
phi = (x,u,du) -> (1 - u^2 - 2*(1-x^2)*u)/epsilon
g1(u,du) = 0;
g2(u,du) = 0;
init = zeros(201);
x,u1 = FNC.bvp(phi,domain,g1,g2,init);
plot(x,u1,xaxis=(L"x"),yaxis=(L"u(x)"),
title="Solution of Carrier problem")