MATLAB 2

MATLAB 2 - Exercise 2.1 Exercise 2.2 a) y ' = (exp( - x) -...

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: Exercise 2.1 Exercise 2.2 a) y ' = (exp( - x) - y) (exp( - x) + 1 + y) 4 3 2 1 y 0 -1 -2 -3 -4 -2 0 2 4 x 6 8 10 Dfield draws the lines based on the initial condition I provided when I clicked somewhere on the graph. b) It's much easier to plot the direction field of a difficult or impossible differential than to actually solve it. Exercise 2.3 y'=x+y 4 3 2 1 y 0 -1 -2 -3 -4 -2 0 2 4 x 6 8 10 If the initial value in this problem weren't (1,1) it wouldn't greatly throw off the solution. Exercise 2.4 y'=y-2 4 3 2 1 y 0 -1 -2 -3 -4 -2 0 2 4 x 6 8 10 It diverges quickly so inaccuracy throws off the solution greatly. Exercise 2.5 y ' = k (A - y) 4 A =1 k=3 3 2 1 y 0 -1 -2 -3 -4 0 1 2 3 4 5 t 6 7 8 9 10 A is the ambient temperature because all solutions of the differential equation approach it as does the temperature of something getting cooled or heated in reality. K is a constant as it's function in the equation is to scale the function ambient-temp. Exercise 2.6 a) dy/dt = k(A - y), y(0) = -8 b) A = 42, as that's the temperature in the fridge. c) y ' = k (A - y) 50 A = 42 k = .2 40 30 20 y 10 0 -10 0 5 10 15 20 t 25 30 35 40 y = 40 where t ~ 16. d) y ' = k (A - y) A = 70 k = .2 70 60 50 40 y 30 20 10 0 -10 0 5 10 15 20 t 25 30 35 40 y = 40 where t ~ 4.5 so the time saved is 16 4.5 = 11.5 Matlab 2 C03 Leonard Harpster A06802204 ...
View Full Document

This note was uploaded on 04/21/2008 for the course MATH 20F taught by Professor Buss during the Winter '03 term at UCSD.

Ask a homework question - tutors are online