hw5_solution

hw5_solution - Numerical Analysis in Engineering ME 140A,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Numerical Analysis in Engineering ME 140A, Fall 2007 Homework #5 Solution November 14, 2007 By: Mohamad Nasr-Azadani: mmnasr@engr.ucsb.edu 1. For the given value of = 3 . 2, the solution of logistic difference equation will converge to a steady 2-cycle behavior. See p1.m Matlab code for the implementation of this 5 10 15 20 25 30 35 40 45 50 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 u = 0.2 n u(n) 5 10 15 20 25 30 35 40 45 50 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 u = 0.4 n u(n) 5 10 15 20 25 30 35 40 45 50 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 n u(n) u = 0.6 5 10 15 20 25 30 35 40 45 50 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 u = 0.8 n u(n) Figure 1: (Problem 1) u n vs. n for different initial conditions ( = 3 . 2). problem. Note that this code also uses u n function.m function. 1 2. a) See p2parta.m for the implementation of this part. The obtained results for 0.01% accuracy were as: = 2 . 90 , MaxN = 74 = 2 . 95 , MaxN = 147 = 2 . 99 , MaxN = 682 Note that the relative error was defined as = u n +1- u n u n +1 100% . (1) 10 20 30 40 50 60 70 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 rho = 2.90 n u(n) 20 40 60 80 100 120 140 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 rho = 2.95 n u(n) 100 200 300 400 500 600 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 rho = 2.99 n u(n) Figure 2: (Problem 2-a)...
View Full Document

This note was uploaded on 11/05/2009 for the course ME 140A taught by Professor Meiburg during the Fall '08 term at UCSB.

Page1 / 6

hw5_solution - Numerical Analysis in Engineering ME 140A,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online