Matlab 5

Matlab 5 - MATLAB Assignment 5 Second Order ODEs Exercise...

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

View Full Document Right Arrow Icon
20 25 30 35 40 45 50 -6 -4 -2 0 2 4 6 x 10 10 MATLAB Assignment 5 Second Order ODEs Exercise 5.1 (a) >> solve('r^2-r+(5/4)=0') ans = 1/2+i 1/2-i >> f=inline('exp(1/2*t)*(cos(t)+sin(t))') f = Inline function: f(t) = exp(1/2*t)*(cos(t)+sin(t)) >> fplot(f,[20,50]) (b)
Background image of page 1

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

View Full DocumentRight Arrow Icon
This graph has the solution oscillating with increased amplitude as t increases. This is because the a in r 1 =a+bi and r 2 =a-bi is positive unlike the example. Exercise 5.2 (a) >> dsolve('D2y-2*Dy-y=3*cos(t)') ans = exp(t+t*2^(1/2))*C2+exp(t-t*2^(1/2))*C1-3/4*cos(t)-3/4*sin(t) (b) >> dsolve('D2y+7*y*Dy+y=3*sin(t)') ??? Error using ==> maple at 129 Error, invalid input: rhs received [diff(diff(y(t),t),t) = -7*y(t)*diff(y(t),t)-y(t)+3*sin(t)], which is not valid for its 1st argument, expr Error in ==> dsolve at 365 RHS{j} = . .. Exercise 5.3 (a) y =x 1 y' =x 1 ' =x 2 y'' =(y') ' =x 2 ' y'' – 5y' – 10y=8 cos(t) x 2 ' – 5x 2 – 10x 1 = 8 cos(t) x 2 ' = 8 cos(t) + 5x 2 +10x 1 x 1 ' =x 2 (b) 3y'' + (1/t 2 ) y' + (1/t) y 2 = 20 3x
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/23/2008 for the course MATH 20D taught by Professor Mohanty during the Winter '06 term at UCSD.

Page1 / 6

Matlab 5 - MATLAB Assignment 5 Second Order ODEs Exercise...

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