Professional Documents
Culture Documents
16-17AY2 Tutorial 5
16-17AY2 Tutorial 5
Tutorial #5
1. Use Runge-Kutta 4th order method to solve the below problem. Set 0.01 as step
size. Write your own codes and compare your result with the one obtained by
using built-in function ‘ode45’.
2. Use the shooting method to solve the below problem. Develop an algorithm that
can automatically determine the next guess based on the data that have been
collected. Stop the search if
|calculated_boundary_condition – given_boundary_condition| < 10 -10.
Compare your result with the one obtained by using built-in function
‘fminsearch’.
3. Solve the below problem by using finite difference method. Use 0.01 as step size.
Compare your results with the ones obtained by using built-in function ‘bvp4c’.
Some tips are provided at the end of this document in case that you need them.
4. Solve the below algebraic equation by using bisection method. Stop the iteration
when |x - xnew| < 10-10. Compare your result with the one obtained by using
built-in function ‘fzero’.
Sin(x) – 1.5x = 5
Step 4: Repeat Step 2-3 until condition (|x - xnew| < 10-10) is met.
(End of introduction to bisection method. Next Page contains an idea for solving
Question 3.)
An idea for solving Question 3: