Skip to main content

Numerical Methods · Numerical ODE and introductory PDE methods

Linear shooting hits the far boundary in one sensitivity step

Problem

Numerical Methods practice problem

Consider the linear two-point problemy′′=y−t,y(0)=0,y(1)=0.y''=y-t,\qquad y(0)=0,\qquad y(1)=0.1. Solve the initial-value problem with y(0)=0y(0)=0 and y′(0)=sy'(0)=s in closed form. Deduce the unique missing slope s∗s_* for which y(1;s∗)=0y(1;s_*)=0, and write the exact solution y(t)y(t). Equivalently, introduce the pair of IVPsu′′=u−t,u(0)=0,u′(0)=0,v′′=v,v(0)=0,v′(0)=1,\begin{aligned} u''&=u-t,& u(0)&=0,& u'(0)&=0,\\ v''&=v,& v(0)&=0,& v'(0)&=1, \end{aligned}and obtain s∗s_* from u(1)+s∗v(1)=0u(1)+s_* v(1)=0.

2. Let z=∂y/∂sz=\partial y/\partial s. Derive the sensitivity IVP satisfied by zz, evaluate z(1)z(1), and perform one Newton updates1=s0−y(1;s0)−0z(1;s0)s_1=s_0-\frac{y(1;s_0)-0}{z(1;s_0)}from the initial guess s0=0s_0=0. Prove that s1=s∗s_1=s_* and explain why a linear BVP needs only one such correction.

3. Now discretize the first-order system y′=vy'=v, v′=y−tv'=y-t by Heun's method (improved Euler) with h=1/2h=1/2, starting from y0=0y_0=0, v0=sv_0=s. Compute the discrete map s↦y2(s)s\mapsto y_2(s) with exact rational arithmetic, and solve y2(s)=0y_2(s)=0. Confirm that one discrete Newton step from s0=0s_0=0, using the discrete sensitivity ∂y2/∂s\partial y_2/\partial s, recovers the same slope.

4. Do not replace shooting by a centered three-point Poisson stencil, do not treat the far condition as y′(1)=0y'(1)=0, and do not iterate Newton as if s↦y(1;s)s\mapsto y(1;s) were a genuinely nonlinear scalar map.

Hint

Hint

A particular solution of y′′=y−ty''=y-t is y=ty=t. The homogeneous solutions are sinh⁡\sinh and cosh⁡\cosh, and y(0)=0y(0)=0 kills the cosh⁡\cosh coefficient.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Numerical Methods sample problem: Try the free sample problem.

More Numerical Methods practice problems

Back to Numerical Methods

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.