{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw18_solutions

hw18_solutions - Homework#8 1 We have where is the...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework #8 1. ( ) ( ) We have ( ) where is the Lipschitz constant for ( ) ( ) . We have ( ) so we need to know the solution to actually complete the estimation. We find ( ) so which implies that ( ) 2. Using previous problem we need to find a bound on ( ) Since ( ) | | * , -+ , - ( ) we need to find the upper bound for We start computing it ( ) ( ) ( ) Knowing what y is, we get that , - ( ) and therefore ( ) | | * , -+ 3. Matlab code for this problem First file: function [f,k]=funeval(t,y,k) % this function computes f(t,y) and increases the number of function % evaluations k k=k+1; f=sin(t+y)*exp(-sqrt(1+y^2)); end
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Second file: clear all close all clc n=[2 4 10 100 1000 2000]; % set of number of steps h=2./n; % define step sizes for i=1:length(n) t0=0; % initial time y0=2; % initial value of function number_eval=0; % numver of function evaluations for k=1:n(i) [f0,number_eval]=funeval(t0,y0,number_eval); ybar= y0+h(i)*f0; % predict [f1,number_eval]=funeval(t0+h(i),ybar,number_eval);
Image of page 2
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern