ProblemSetC

ProblemSetC - ode45(fb, [0 15 ] , 1) figure title 'Solution...

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

View Full Document Right Arrow Icon
% Problem Set C %% Problem 1a f = @(t,y)(-exp(y)/(t.*exp(y)-sin(y))); % finding the approximate values [t, ya] = ode45(f, 0 : 1.5 : 3 , 1); format long; [t ya] % Graphing Solution on required interval ode45(f , [0.5 4] , 1); o %% 1b f = @(t,y)(-exp(y)/(t.*exp(y)-sin(y))); solution = dsolve('Dy = -exp(y)/(t * exp(y) - sin(y))' , 'y(1.5) = 2' , 't') figure ezplot(solution , [0.5 4]) e %% Problem 10 % part a fa = @(t, y) exp(-3.*t) + (1./(1+y.^2)) ode45 (fa, [0 10], -1) title 'Solution to (exp(-3.*t) + 1/(1+y.^2)) with intital condition y(0) = -1'; xlabel t; ylabel y; y %The Solution to this equation has a limiting value for y which equals 3.5 % %% part b fb = @(t,y) (exp(-2.*t) + y.^2);
Background image of page 1

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

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

Unformatted text preview: ode45(fb, [0 15 ] , 1) figure title 'Solution to (exp(-2.*t) + y.^2) with initial Condition y(0) = 1'; xlabel t; ylabel y; y %% part c fc = @(t,y) (cos(t) - y.^3); ode45(fc , [0 10] , 0); figure title 'Solution to (cos(t) - y.^3) with intitial condition y(0) = 0' xlabel 't'; ylabel 'y'; axis tight; a % The Solution is a sinusoidal function which does not have a limiting % value for y % %% part d fd = @(t,y)((sin(t)).*y - y.^2); ode45(fd, [0 150 ] , 2); title 'Solution to ((sin(t)).*y - y.^2) with initial condition y(0) = 2'; xlabel 't'; ylabel 'y'; y % As t tends to infinity the solution osillates about zero %...
View Full Document

This note was uploaded on 06/28/2009 for the course MATH 246H taught by Professor Zheng during the Spring '08 term at Maryland.

Page1 / 2

ProblemSetC - ode45(fb, [0 15 ] , 1) figure title 'Solution...

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

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