Existence and Uniqueness of Solutions of BVPS: Theorem Suppose That F Is Continuous On The Set

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

(6.

1) - The Linear Shooting Method

Consider the boundary value problems (BVPs) for the second order differential equation of the form
(*) y ′′  fx, y, y ′ , a ≤ x ≤ b, ya   and yb  .
Under what conditions does a boundary value problem have a solution or has a unique solution?
1. Existence and Uniqueness of Solutions of BVPs:
Theorem Suppose that f is continuous on the set
D  x, y, y ′ ; a ≤ x ≤ b, −   y  , −   y ′  
and the partial derivatives f y and f y ′ are continuous on D. If
f y x, y, y ′   0, for all x, y, y ′ in D, and
there exists a constant M such that
f y ′ x, y, y ′  ≤ M for all x, y, y ′  in D,

then the boundary value problem (*) has a unique solution.

Example Consider the following boundary value problem:


y ′′  e −x y  siny ′   0, 1 ≤ x ≤ 2, y1  y2  0
Determine if the boundary value problem has a unique solution.
Rewrite y ′′  −e −x y − siny ′  so fx, y, y ′   −e −x y − siny ′ 
Check conditions:
fx, y, y ′   −e −x y − siny ′ , f y x, y, y ′   xe −x y , and f y ′ x, y, y ′   − cosy ′  are continuous on
D x, y, y ′ ; 1 ≤ x ≤ 2, −   y  , −   y ′   .
(i) f y x, y, y ′   xe −x y  0 on D.
(ii) f y ′ t, y, y ′   |− cosy ′ | ≤ 1  M.
So, the boundary value problem has a unique solution in D.

Example Consider the linear boundary value problem of the form:


y ′′  pxy ′  qxy  rx, a ≤ x ≤ b, ya  , yb  

Under what condition(s) does a linear BVP have a unique solution?


For the linear boundary value problem, fx, y, y ′   pxy ′  qxy  rx. Observe that
f y x, y, y ′   qx, f y ′ x, y, y ′   px.
f y x, y, y ′  and f y ′ x, y, y ′  are continuous on D if and only if px, qx and rx are continuous for
a ≤ x ≤ b. Now we check conditions in (i) and (ii).
(i) f y x, y, y ′   qx  0 for a ≤ x ≤ b.
(ii) Since f y ′ is continuous on a, b , f y ′ is bounded.
So, if px, qx and rx are continuous for a ≤ x ≤ b, and qx  0 for a ≤ x ≤ b, then this linear
boundary value problem has a unique solution.

1
2. The Linear Shooting Method:
Consider the linear boundary value problems of the form:
y ′′  pxy ′  qxy  rx, a ≤ x ≤ b, ya  , yb  
where px, qx and rx are continuous and qx  0 for a ≤ x ≤ b. Consider the solutions of the
following two initial-value problems:
(i) y ′′  pxy ′  qxy  rx, a ≤ x ≤ b, ya  , y ′ a  0
(**)
(ii) y ′′  pxy ′  qxy, a ≤ x ≤ b, ya  0, y ′ a  1
say, y 1 x and y 2 x. Let yx be the following linear combination of y 1 x and y 2 x :
 − y 1 b
yx  y 1 x  y 2 x
y 2 b
Then yx is the solution of the boundary value problem. Check:
 − y 1 b ′′  − y 1 b
y ′′ x  y ′′1 x  y 2 x  pxy ′1 x  qxy 1 x  rx  pxy ′2 x  qxy 2 x
y 2 b y 2 b
 − y 1 b ′  − y 1 b
 px y ′1 x  y 2 x  qx y 1 x  y 2 x  rx
y 2 b y 2 b
So, yx is a solution of y ′′  pxy ′  qxy  rx. Check the boundary conditions:
 − y 1 b  − y 1 b
ya  y 1 a  y 2 a    0  
y 2 b y 2 b
 − y 1 b
yb  y 1 b  y 2 b  .
y 2 b
This suggests that a boundary value problem can be solved by solving two (independent) initial-value
problems in (**).
Review: Solve a second-order initial-value problem:
y ′′  fx, y, y ′ , ya   0 , y ′ a   1 .
Let u 1  y 1 , and u 2  y ′1 . Then above second-order differential equation for y becomes the following
system of two first-order differential equation in u 1 and u 2 :
u ′1  u 2
, a ≤ x ≤ b, u 1 a   0 , u 2 a   1 .
u ′2  f 1 x, u 1 , u 2 

Example Rewrite the differential equation y ′′ − 2y ′  4y  te 2t as a system of 2 1st-order differential


equations.
Set
u1  y 
u 2  y ′  u ′1  u ′1  y ′
 u ′2  y ′′  2y ′ − 4y  te 2t  −4u 1  2u 2  te 2t
The system is:
u ′1  u 2 u ′1 0 1 u1 0
  
u ′2  −4u 1  2u 2  te 2t u ′2 −4 2 u2 te 2t

2
Example Rewrite the initial-value problem for the system of 2 second-order differential equations
y ′′1  y ′1 − 2y ′2  2y 1 − y 2  t
, y 1 0  1, y 2 0  −1, y ′1 0  2, y ′2 0  3
y ′′2 − 3y ′1  y 1  4y 2  2 sint

as an initial-value problem for a system of 4 first-order differential equations.


Set
u1  y1
u 2  y ′1  u ′1  u ′1  u 2
 u ′2  y ′′1  −2y 1  y 2 − y ′1  2y ′2  t  −2u 1  u 3 − u 2  2u 4  t
u3  y2
u 4  y ′2  u ′3  u ′3  u 4
 u ′4  y ′′2  −y 1 − 4y 2  3y ′1  2 sint  −u 1 − 4u 3  3u 2  2 sint
The system of 4 1st-order linear differential equations is:
u ′1  u 2
u ′2  −2u 1  u 3 − u 2  2u 4  t
, u 1 0  1, u 2 0  2, u 3 0  −1, u 4 0  3;
u ′3  u 4
u ′4  −u 1 − 4u 3  3u 2  2 sint
or in matrix-vector notation:
u ′1 0 1 0 0 u1 0 u 1 0 1
u ′2 −2 −1 1 2 u2 t u 2 0 2
  , 
u ′3 0 0 0 1 u3 0 u 3 0 −1
u ′4 −1 3 −4 0 u4 2 sint u 4 0 3

Example Solve the boundary value problem:


y ′′  − 4x y ′ − 22 y  22 ln x, 1 ≤ x ≤ 2, y1  1 , y2  ln 2.
x x 2
Exact solution is:
yx  − 12 2 − 4x  3 x 2 − x 2 ln x .
x 2
Note that it is a linear boundary value problem where px  − 4x , qx  − 22 , rx  22 ln x
x x
continuous on 1, 2.
Since qx ≱ 0, we cannot say if this boundary value problem has a unique solution. Now we solve
the following two initial-value problems:

3
(i) y ′′1  − 4x y ′1 − 2 y 1  2 ln x, 1 ≤ x ≤ 2, y 1 1  1 , y ′ 1  0
1
x2 x2 2
(ii) y ′′2  − 4x y ′2 − 2 y 2 , 1 ≤ x ≤ 2, y 2 1  0, y ′ 1  1
2
x2
Set up the initial-value problem for a system of 4 1st-order differential equations:
u ′1  u 2
u ′2  − 4x u 2 − 22 u 1  22 ln x
x x , u 1 1  1 , u 2 1  0, u 3 1  0, u 4 1  1.
′ 2
u3  u4
u ′4  − 4x u 4 − 22 u 3
x
2 2 2 2
Shooting Method: y"=-4/x*y-2/x *y+2*ln(x)/x , y(1)=1/2,y(2)=ln2 Shooting Method: y"=-4/x*y-2/x *y+2*ln(x)/x , y(1)=1/2,y(2)=ln2
-5
0.8 10

0.7 -6
10

0.6 - y=y +(beta-y (2))/y (2)*y


1 1 2 2
-7
10
0.5

|y(x i)-y i|
2 2 -8
0.4 IVP: y "=-4/x*y -2/x *y +2*ln(x)/x , y (1)=1/2,y (1)=0 10
1 1 1 1 1

0.3 -9
10

0.2
-10
10
2
0.1 IVP: y "=-4/x*y -2/x *y , y (1)=0, y (1)=1
2 2 2 2 2

-11
0 10
1 1.2 1.4 1.6 1.8 2 1 1.2 1.4 1.6 1.8 2
x

 help ode45
ODE45 Solve non-stiff differential equations, medium order method.
[TOUT,YOUT]  ODE45(ODEFUN,TSPAN,Y0) with TSPAN  [T0 TFINAL] integrates

MatLab program for this example lect6_1_ex1.m:


clf
alpha1/2;
betalog(2);
a1;
b2;
[xv,yv]ode45(’funsysa’,[a b],[alpha;0;0;1]);
plot(xv,yv(:,1),’r-.’,xv,yv(:,3),’m–’)
hold
nlength(yv(:,1));
y1nyv(n,1);
y2nyv(n,3);
yvsolyv(:,1)(beta-y1n)/y2n*yv(:,3);
4
truesol-1./(xv.^2).*(2-4*xv3/2*xv.^2-xv.^2.*log(xv));
plot(xv,yvsol,’b-’,xv,truesol,’k-’)
title(’Shooting Method: y"-4/x*y-2/x^2*y2*ln(x)/x^2, y(1)1/2,y(2)ln2’)
text(1.2,0.4,’IVP: y_1"-4/x*y_1-2/x^2*y_12*ln(x)/x^2, y_1(1)1/2,y_1(1)0’)
text(1.3,0.1,’IVP: y_2"-4/x*y_2-2/x^2*y_2, y_2(1)0, y_2(1)1’)
text(1.2,0.6,’- yy_1(beta-y_1(2))/y_2(2)*y_2’)
axis([1 2 0 0.8])
hold off
figure(2)
semilogy(xv,abs(yvsol-truesol),’b-.’)
title(’Shooting Method: y"-4/x*y-2/x^2*y2*ln(x)/x^2, y(1)1/2,y(2)ln2’)
ylabel(’|y(x_i)-y_i| ’)
xlabel(’x’)

MatLab function: funsysa.m


function yvfunsysa(t,y);
yv(1,1)y(2,1);
yv(2,1)-4/t*y(2,1)-2/(t^2)*y(1,1)2*log(t)/(t^2);
yv(3,1)y(4,1);
yv(4,1)-4/t*y(4,1)-2/(t^2)*y(3,1);

Notes: ode45.m is an MatLab building-in function which solves initial-value problems for systems of
n first-order differential equations:
u ′1  f 1 x, u 1 , . . . , u n 
 , a ≤ x ≤ b, u 1 a   1 , . . . , u n a   n .
u ′n  f n x, u 1 , . . . , u n 
It is called by:
[xv,uv]ode45(’funsysa’,[a b],[ 1 , . . . ,  n ]); where funsysa.m is a user-provided Matlab program that
x0  a
x1
evaluates functions of the system at x. The outputs are the vector xv   and
x N−1
xN  b
u 10  u n0
u 11  u n1
uv  . That is, for a ≤ x ≤ b,
  
u 1N  u nN
y 1 x ≈ u 10 , u 11 , . . . , u 1N , . . . , y n x ≈ u n0 , u n1 , . . . , u nN .

5
Exercises:
1. For each of the following boundary value problems, determine (1) if it is linear; and (2) if it has a
unique solution.
(1) y ′′  1x y ′  32 y  lnxx − 1, 1 ≤ x ≤ 2, y1  y2  0
x
(2) y ′′  y 3 − yy ′ , 1 ≤ x ≤ 2, y1  12 , y2  13
(3) y ′′  y ′  2y − ln x 3 − 1x , 2 ≤ x ≤ 3, y2  12  ln2, f3  13  ln 3

2. Consider the boundary value problem: y ′′  y  0, 0 ≤ x ≤ b, y0  0, yb  B. Find choices for b
and B so that this boundary value problem has
(1) no solution;
(2) exactly one solution;
(3) infinitely many solutions.

3. Rewrite the initial-value problem for the system of 2 second-order differential equations
y ′′1  y ′1  y ′2 − 2y 1 − y 2  e 2t
, y 1 0  1, y 2 0  3, y ′1 0  −1, y ′2 0  3
y ′′2 − 3y ′1 − y 1  3y 2  2 cost
as an initial-value problem for a system of 4 first-order differential equations.

4. Consider the boundary value problem:


y ′′  y ′  2y  cosx, 0 ≤ x ≤  , y0  −0. 3, y   −0. 1.
2 2
a. determine if it is linear;
b. determine if it has a unique solution;
c. approximate the solution by the Shooting Method for linear boundary value problem with h   ;
8
and
d. compare the approximation with the true solution
yx  − 1 sinx  3 cosx
10
by plotting the absolute values of the differences.

5. For each of the following boundary value problems,


a. determine if it is linear;
b. determine if it has a unique solution;
c. approximate the solution by the Shooting Method for linear boundary value problem with given h;
and
d. plot the graph of approximation of the solution yx.

(1) y ′′  − 4x y ′  22 y − 22 lnx, 1 ≤ x ≤ 2, y1  − 12 , y2  ln 2, h  0. 05


x x
(2) y ′′  2y ′ − y  xe x − x, 0 ≤ x ≤ 2, y0  0, y2  −4, h  0. 2

6. Let p represent the electrostatic potential in r between two concentric metal spheres of radii R 1 and R 2
where R 1  R 2 . The potential of the inner sphere is kept constant at V 1 volts, and the potential of the
6
outer sphere is 0 volts. The potential in the region between the two spheres is governed by Laplace
equation, which, in this particular application, reduces to
d2p dp
 2r  0, R 1 ≤ r ≤ R 2 , pR 1   V 1 and pR 2   0.
dr 2 dr
Approximate the potential for the case where R 1  2 inches, R 2  4 inches, and V 1  110 volts.

You might also like