DOC PREVIEW
USC EE 518 - assignment_2_solutions

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE 518 : Homework #2 Due on Monday, September 12, 2016Problem 1Solve the initial-value problem:xdydx= y + x2sin x, y(π) = 0We first write the equation in the standard form:dydx+ p(x)y = q(x) ⇒xdydx= y + x2sin x ⇒dydx−yx= x sin xThus, p(x) = −1x, q(x) = x sin xHence, the integrating factor is: I(x) = eRp(x)dx= eR−1xdx= e− ln x=1xTherefore,y(x) = e−Rp(x)dx· (Rq(x)eRp(x)dxdx + c) = x · (Rx sin x1x+ c) = x · (− cos x + c)Since y(π) = 0, we can calculate c:π · (− cos π + c) = 0 ⇒ c = cos π = −1Thus,y(x) = x · (− cos x − 1) = −x cos x − xProblem 2Find the general solution for the given Differential Equations:(i)dydx− y = e2x(ii)y0+ 2xy = 2x31. The equation is already in the standard form:dydx+ p(x)y = q(x) ⇒dydx− y = e2xThus, p(x) = −1, q(x) = e2xHence, the integrating factor is: I(x) = eRp(x)dx= eR−1dx= e−xTherefore,y(x) = e−Rp(x)dx· (Rq(x)eRp(x)dxdx + c) = ex· (Re2xe−xdx + c) = ex· (Rexdx + c) = ex· (exdx + c)2. The equation is already in the standard form:dydx+ p(x)y = q(x) ⇒y0+ 2xy = 2x3⇒Thus, p(x) = 2x, q(x) = 2x3Hence, the integrating factor is: I(x) = eRp(x)dx= eR2xdx= ex2Then, we multiply both sides with I(x) and so we have that:y(x) = e−Rp(x)dx· (Rq(x)eRp(x)dxdx + c) = e−x2· (R2x3ex2dx + c) = e−x2· (R2xex2· x2dx + c) =e−x2· (ex2· x2−Rex2· 2xdx + c) = e−x2· (ex2· x2− ex2+ c) = x2− 1 + ce−x2Problem 3Find the general solution for the given Differential Equations:(i)y000− y00+ y0− y = 0Page 1 of 4EE 518 : Homework #2 Due on Monday, September 12, 2016(ii)(D − 2)(D − 3)y = 7e2x1. From the given equation, we get: D3−D2+D−1 = 0 ⇒ (D−1)(D2+1) = 0 ⇒ D = 1, D = i, D = −iThis means that we have the linearly independent solutions: ex, eix, e−ixor ex, cos x, sin xThese sets give as the solutions:y(x) = c1ex+ c2eix+ c3e−ixor y(x) = c1ex+ c2cos x + c3sin x2. From the given equation, we get: D = 3, D = 2This means that we have the linearly independent solutions: e3x, e2xThese sets give as the solutions:yc(x) = c1e3x+ c2e2xSince the given equation is of the form: P (D)y = F (x) = Aeαx,we have that:y(x) = yc(x) + yp(x) = c1e3x+ c2e2x+ A0xe2xThen,D2yp− 5Dyp+ 6yp= D2(A0xe2x) − 5D(A0xe2x) + 6(A0xe2x) = 7e2xA0= −7Thus, the solution is:y(x) = c1e3x+ c2e2x− 7xe2xProblem 4Suppose y1(x) = e−2x+ xe−x, y2(x) = xe−2x+ xe−xand y3(x) = e−2x+ xe−2x+ xe−xare three specialsolutions to the linear differential equation:y00+ α1y0+ α2y = F (x)where α1and α2are constants.1. Find α1, α2and F (x).2. Determine the general solution to the linear differential equation.3. If f(x) is a special solution to the linear differential equation and f(0) = 0, f0(0) = 0, then find f(x).1. Let L = D2+α1D +α2. Then, Ly1(x) = F (x), Ly2(x) = F (x), Ly3(x) = F (x), since they are specialsolutions.Thus, L(y3(x) − y1(x)) = L(y3(x) − y2(x)) = 0. This means that y3(x) − y1(x) = xe−2xand y3(x) −y2(x) = e−2xare two special solutions of the associated homogeneous equation y00+ α1y0+ α2y = 0.Since xe−2xand e−2xare linearly independent, we have that L = (D + 2)2, which gives us α1=4, α2= 4.xe−xis a special solution to Ly = F (x), so we have that:F (x) = (xe−x)00+ 4(xe−x)0+ 4(xe−x) = (x + 2)e−x2. The general solution can be written as: y(x) = c1e−2x+ c2xe−2x+ xe−xwhere c1, c2∈ <3. Let f(x) = c1e−2x+c2xe−2x+xe−x. Then, f(0) = 0 ⇒ c1= 0 and f0(0) = 0 ⇒ c2+1 = 0 ⇒ c2= −1.Thus, f(x) = −xe−2x+ xe−x.Page 2 of 4EE 518 : Homework #2 Due on Monday, September 12, 2016Problem 5This is a Matlab exercise. Produce a figure with two different subplots. In the first subplot, plot thefunctions:y(x) = sin(x), z(x) = cos(x +π4), w(x) = sin(x) + cos(x8)for x ∈ [0, 10]and in the second subplot, plot the function:z(x, y) = sin(x2+ y2)/(x2+ y2)for x, y ∈ [−10, 10].Put titles, label your axes and put grids. For the 2D plot, customize all the lines, change the colors and puta legend. For this exercise, please provide your script along with the plots that you produced (printed).Page 3 of 4EE 518 : Homework #2 Due on Monday, September 12, 2016Sample code and plots:Page 4 of


View Full Document

USC EE 518 - assignment_2_solutions

Download assignment_2_solutions
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view assignment_2_solutions and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view assignment_2_solutions 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?