Differential Equations Solutions 116

Differential Equations Solutions 116 - 126 Chapter 20....

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 126 Chapter 20. Solutions: Solution of Ordinary Differential Equations % y(2) is to b_desired at t=1. b_desired = 1; [t,y] = ode45(@yprime,[0,1],[1,z]); f = y(end,1)-b_desired; % end of evalshoot %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function yp = yprime(t,y) yp = [ y(2); -(pi/2)^2*y(1)+(pi/2)^2*t.^2 + 2]; % end of yprime %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CHALLENGE 20.18. No answer provided. CHALLENGE 20.19. (Partial Solution.) We use Taylor series expansions to derive the second formula: h2 h3 h4 u (t) + u (t) + u (η1 ), η1 ∈ [t, t + h], 2 6 24 h2 h3 h4 u(t − h) = u(t) − hu (t) + u (t) − u (t) + u (η2 ), η2 ∈ [t − h, t]. 2 6 24 u(t + h) = u(t) + hu (t) + Adding, we obtain u(t + h) + u(t − h) = 2u(t) + h2 u (t) + h4 [u (η1 ) + u (η2 )] . 24 Using the Mean Value Theorm on the last term and solving for u (t) gives ⇒ u (t) = u(t − h) − 2u(t) + u(t + h) h4 2u (η ), η ∈ [t − h, t + h]. −2 h2 h · 24 O (h2 ) ...
View Full Document

Ask a homework question - tutors are online