Skip to main content

Numerical Methods · Numerical ODE and introductory PDE methods

Linear shooting hits the far boundary in one sensitivity step

Problem

Consider the linear two-point problem \[ y''=y-t,\qquad y(0)=0,\qquad y(1)=0. \] 1. Solve the initial-value problem with $y(0)=0$ and $y'(0)=s$ in closed form. Deduce the unique missing slope $s_*$ for which $y(1;s_*)=0$, and write the exact solution $y(t)$. Equivalently, introduce the pair of IVPs \[ \begin{aligned} u''&=u-t,& u(0)&=0,& u'(0)&=0,\\ v''&=v,& v(0)&=0,& v'(0)&=1, \end{aligned} \] and obtain $s_*$ from $u(1)+s_* v(1)=0$. 2. Let $z=\partial y/\partial s$. Derive the sensitivity IVP satisfied by $z$, evaluate $z(1)$, and perform one Newton update \[ s_1=s_0-\frac{y(1;s_0)-0}{z(1;s_0)} \] from the initial guess $s_0=0$. Prove that $s_1=s_*$ and explain why a linear BVP needs only one such correction. 3. Now discretize the first-order system $y'=v$, $v'=y-t$ by Heun's method (improved Euler) with $h=1/2$, starting from $y_0=0$, $v_0=s$. Compute the discrete map $s\mapsto y_2(s)$ with exact rational arithmetic, and solve $y_2(s)=0$. Confirm that one discrete Newton step from $s_0=0$, using the discrete sensitivity $\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)=0$, and do not iterate Newton as if $s\mapsto y(1;s)$ were a genuinely nonlinear scalar map.

Hint

A particular solution of $y''=y-t$ is $y=t$. The homogeneous solutions are $\sinh$ and $\cosh$, and $y(0)=0$ kills the $\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.