Math 2650A. J. MeirCopyright (C) A. J. Meir. All rights reserved.This worksheet is for educational use only. No part of this publication may be reproduced or transmitted for profit in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system without prior written permission from the author. Not for profit distribution of the software is allowed without prior written permission, providing that the worksheet is not modified in any way and full credit to the author is acknowledged.Second Order EquationsA Brief ReviewConsider a linear, homogeneous, constant coefficient second order equationNiMqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YlISIi + NiMlImFHNiMqJiUjZHhHIiIiJSNkdEchIiI= + NiMvJSNieEciIiE=.The characteristic polynomial corresponding to this equation isNiMvLCgqJCUickciIiMiIiIlI2FyR0YoJSJiR0YoIiIhwhose roots are NiMmJSJyRzYjIiIiand NiMmJSJyRzYjIiIj whereNiMvJiUickc2IyIiIiomLCYlImFHISIiLSUlc3FydEc2IywmKiRGKiIiI0YnKiYiIiVGJyUiYkdGJ0YrRidGJ0YxRis=NiMvJiUickc2IyIiIyomLCYlImFHISIiLSUlc3FydEc2IywmKiRGKkYnIiIiKiYiIiVGMSUiYkdGMUYrRitGMUYnRis= .We will consider three distinct cases (depending on the value of NiMsJiokKSUiYUciIiMiIiJGKComIiIlRiglImJHRighIiI=):I. Two distinct real roots.If NiMyIiIhLCYqJCUiYUciIiMiIiIqJiIiJUYpJSJiR0YpISIi there are two real distict roots NiMwJiUickc2IyIiIiZGJTYjIiIj and the homogenous solution isNiMvLSYlInhHNiMlImhHNiMlInRHLCYqJiYlImNHNiMiIiJGMC0lJGV4cEc2IyomJiUickdGL0YwRipGMEYwRjAqJiZGLjYjIiIjRjAtRjI2IyomJkY2RjlGMEYqRjBGMEYw.II. A double root.If NiMvLCYqJCUiYUciIiMiIiIqJiIiJUYoJSJiR0YoISIiIiIh there are two equal roots NiMvJSJyRyZGJDYjIiIi= NiMmJSJyRzYjIiIj and the homogenous solution isNiMvLSYlInhHNiMlImhHNiMlInRHLCYqJiYlImNHNiMiIiJGMC0lJGV4cEc2IyomJSJyR0YwRipGMEYwRjAqKCZGLjYjIiIjRjBGKkYwRjFGMEYw.III. Complex conjugate roots.If NiMyLCYqJCUiYUciIiMiIiIqJiIiJUYoJSJiR0YoISIiIiIh there are two complex conjugate rootsNiMvJiUickc2IyIiIiwmJSZhbHBoYUdGJyomJSJJR0YnJSViZXRhR0YnRic=NiMvJiUickc2IyIiIywmJSZhbHBoYUciIiIqJiUiSUdGKiUlYmV0YUdGKiEiIg==where NiMvJSZhbHBoYUcsJComJSJhRyIiIiIiIyEiIkYq, NiMvJSViZXRhRyomLSUlc3FydEc2IywmKiYiIiUiIiIlImJHRixGLCokJSJhRyIiIyEiIkYsRjBGMQ== and NiMlIklH is the square root of -1. The homogenous solution isNiMvLSYlInhHNiMlImhHNiMlInRHLCYqKCYlImNHNiMiIiJGMC0lJGV4cEc2IyomJSZhbHBoYUdGMEYqRjBGMC0lJGNvc0c2IyomJSViZXRhR0YwRipGMEYwRjAqKCZGLjYjIiIjRjBGMUYwLSUkc2luR0Y4RjBGMA==.Examples:1. Consider the differential equation NiMvLCgqJiomKSUiZEciIiMiIiIlInhHRipGKiokKSUjZHRHRilGKiEiIkYqKiYlI2R4R0YqRi5GL0YvIiInRi8iIiE=. The characteristic polynomial is NiMvLCgqJCklInJHIiIjIiIiRilGJyEiIiIiJ0YqIiIh. The roots of the characteristic polynomial aresolve(r^2-r-6=0);so the solution of the equation is NiMvLSYlInhHNiMlImhHNiMlInRHLCYqJiYlImNHNiMiIiJGMC0lJGV4cEc2IyomIiIkRjBGKkYwRjBGMComJkYuNiMiIiNGMC1GMjYjLCQqJkY5RjBGKkYwISIiRjBGMA==.2. Consider the differential equation NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRikiIidGKQ==NiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyIiKkYnIiIh. The characteristic polynomial is NiMvLCgqJCklInJHIiIjIiIiRikqJiIiJ0YpRidGKUYpIiIqRikiIiE=. The roots of the characteristic polynomial aresolve(r^2+6*r+9=0);so the solution of the equation is NiMvLSYlInhHNiMlImhHNiMlInRHLCYqJiYlImNHNiMiIiJGMC0lJGV4cEc2IywkKiYiIiRGMEYqRjAhIiJGMEYwKigmRi42IyIiI0YwRipGMEYxRjBGMA==.3. Consider the differential equation NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRikiIiVGKQ==NiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomIiImRiclInhHRidGJyIiIQ==. The characteristic polynomial is NiMvLCgqJCUickciIiMiIiIqJiIiJUYoRiZGKEYoIiImRigiIiE=. The roots of the characteristic polynomial aresolve(r^2+4*r+5=0);Note, Maple writes NiMlIklH for NiMtJSVzcXJ0RzYjLCQiIiIhIiI=, so the solution of the equation isNiMvLSYlInhHNiMlImhHNiMlInRHKiYtJSRleHBHNiMsJComIiIjIiIiRipGMiEiIkYyLCYqJiYlImNHNiNGMkYyLSUkY29zR0YpRjJGMiomJkY3NiNGMUYyLSUkc2luR0YpRjJGMkYy.4. Consider the initial value problem NiMvLCYqJiomKSUiZEciIiMiIiIlInhHRipGKiokKSUjZHRHRilGKiEiIkYqKiYiIiVGKkYrRipGKiIiIQ==, NiMvLSUieEc2IyIiISIiIg==, NiMqJiUjZHhHIiIiJSNkdEchIiI=(0)=1. The characteristic polynomial is NiMvLCYqJCklInJHIiIjIiIiRikiIiVGKSIiIQ==. The roots of the characteristic polynomial aresolve(r^2+4=0);so the general solution of the equation is NiMvLSYlInhHNiMlImhHNiMlInRHLCYqJiYlImNHNiMiIiJGMC0lJGNvc0c2IyomIiIjRjBGKkYwRjBGMComJkYuNiNGNUYwLSUkc2luR0YzRjBGMA==. We now use the initial conditions to solve for NiMmJSJjRzYjIiIi and NiMmJSJjRzYjIiIj.sol:=c[1]*cos(2*t)+c[2]*sin(2*t);eq1:=subs(t=0,sol)=1;eq2:=subs(t=0,diff(sol,t))=1;solve({eq1,eq2},{c[1],c[2]});so the solution is NiMvLSUieEc2IyUidEcsJi0lJGNvc0c2IyomIiIjIiIiRidGLkYuKiYtJSRzaW5HRitGLkYtISIiRi4=.Undetermined CoefficientsThis method applies to special classes of nonhomogeneous second order equations. It is crucial that the homogeneous problem have constant coefficients. Consider a nonhomogeneous constant coefficient second order equationNiMqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YlISIi + NiMlImFHNiMqJiUjZHhHIiIiJSNkdEchIiI= + NiMvJSNieEctJSJmRzYjJSJ0Rw==.If the right hand side NiMtJSJmRzYjJSJ0Rw== has the form (exponential times a polynomial times a trigonometric polynomial) we guess a particular solution of the same formNiMtJSJmRzYjJSJ0Rw===NiMtJSRleHBHNiMqJiUia0ciIiIlInRHRig=(NiMsKComJiUiYUc2IyUibkciIiIpJSJ0R0YoRilGKSZGJjYjLCZGKEYpRikhIiJGKSlGK0YuRik=+...+NiMmJSJhRzYjIiIh)(NiMsJi0lJGNvc0c2IyomJSZvbWVnYUciIiIlInRHRilGKS0lJHNpbkdGJkYp).Then guess a particular solution of the formNiMtJiUieEc2IyUicEc2IyUidEc==NiMtJSRleHBHNiMqJiUia0ciIiIlInRHRig=(NiMsKComJiUiQUc2IyUibkciIiIpJSJ0R0YoRilGKSZGJjYjLCZGKEYpRikhIiJGKSlGK0YuRik=+...+NiMmJSJBRzYjIiIh)NiMtJSRjb3NHNiMqJiUmb21lZ2FHIiIiJSJ0R0Yo+NiMtJSRleHBHNiMqJiUia0ciIiIlInRHRig=(NiMsKComJiUiQkc2IyUibkciIiIpJSJ0R0YoRilGKSZGJjYjLCZGKEYpRikhIiJGKSlGK0YuRik=+...+NiMmJSJCRzYjIiIh)NiMtJSRzaW5HNiMqJiUmb21lZ2FHIiIiJSJ0R0Yo.If the above solution NiMmJSJ4RzYjJSJwRw== is a solution of the homogeneous equation you need to multiply it by NiMpJSJ0RyUic0c=(NiMlInNH counts the number of times NiMmJSJ4RzYjJSJwRw== is a solution of the homogeneous problem, and for a second order equation NiMlInNH is either 1 or 2).Example:Consider the differential equation NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRikiIiVGKQ==NiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomIiImRiclInhHRidGJy0lJGNvc0c2IyUidEc=. The characteristic polynomial is NiMvLCgqJCUickciIiMiIiIqJiIiJUYoRiZGKEYoIiImRigiIiE=. The roots of the characteristic polynomial aresolve(r^2+4*r+5=0);so the solution of the homogeneous problem is NiMvLSYlInhHNiMlImhHNiMlInRHKiYtJSRleHBHNiMsJComIiIjIiIiRipGMiEiIkYyLCYqJiYlImNHNiNGMkYyLSUkY29zR0YpRjJGMiomJkY3NiNGMUYyLSUkc2luR0YpRjJGMkYy we now have to find one particular solution of NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRikiIiVGKQ==NiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomIiImRiclInhHRidGJy0lJGNvc0c2IyUidEc= in order to obtain the general solution. The idea is to find this solution using an intelligent guess. The second derivative of a cosine term is again a cosine term, but the first one is a sine term. Therefore we try an expression NiMvLSYlInhHNiMlInBHNiMlInRHLCYqJiUiQUciIiItJSRjb3NHRilGLkYuKiYlIkJHRi4tJSRzaW5HRilGLkYu as initial guess. The goal is to find the undetermined coefficients NiMlIkFH, NiMlIkJH (in NiMtJiUieEc2IyUicEc2IyUidEc= ) in such a manner that NiMmJSJ4RzYjJSJwRw== is the desired particular solution. restart:guess:=y(t)=A*cos(t)+B*sin(t);param:={A,B};eq:=diff(y(t),t$2)+4*diff(y(t),t)+5*y(t)=cos(t);subs(guess,eq);simplify(%);Since NiMtJSRjb3NHNiMlInRH and NiMtJSRzaW5HNiMlInRH are linearly independent, the coefficient NiMsJiomIiIlIiIiJSJBR0YmRiYqJkYlRiYlIkJHRiZGJg== of the cosine on the left hand side of the equation has to be equal to 1 (the coefficient of the cosine on the right), whereas the coefficient NiMsJiomIiIlIiIiJSJCR0YmRiYqJkYlRiYlIkFHRiYhIiI= of the sine has to be zero. This leads to two linear equations which we solve bysloveparam:=solve({4*A+4*B=1,4*B-4*A=0},param);Thus, NiMvLSYlInhHNiMlInBHNiMlInRHKiYsJi0lJGNvc0dGKSIiIi0lJHNpbkdGKUYvRi8iIikhIiI= is a particular solution. We can check this by using the odetest-command.odetest(y(t)=(cos(t)+sin(t))/8,D(D(y))(t)+4*D(y)(t)+5*y(t)=cos(t));Therefore the general solution is given as NiMvLSYlInhHNiMlJGdlbkc2IyUidEcsJi0mRiY2IyUiaEdGKSIiIi0mRiY2IyUicEdGKUYw, i.e. NiMvLSYlInhHNiMlJGdlbkc2IyUidEcsJiomLSUkZXhwRzYjLCQqJiIiIyIiIkYqRjMhIiJGMywmKiYmJSJjRzYjRjNGMy0lJGNvc0dGKUYzRjMqJiZGODYjRjJGMy0lJHNpbkdGKUYzRjNGM0YzKiYsJkY6RjNGP0YzRjMiIilGNEYz, a fact, which you can also test by inserting this expression into the d.e.:odetest(y(t)=exp(-2*t)*(c[1]*cos(t)+c[2]*sin(t))+(cos(t)+sin(t))/8,D(D(y))(t)+4*D(y)(t)+5*y(t)=cos(t));If in addition we were given initial conditions, we would now use those to solve for the constants NiMmJSJjRzYjIiIi and NiMmJSJjRzYjIiIj.ExerciseFind the general solution of NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRikiIiRGLg==NiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomIiIlRiclInhHRidGKSomIiIjRictJSRzaW5HNiMlInRHRic=.restart;ExerciseFind the general solution of NiMvLCYqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YnISIiRiktRig2IyUidEdGKSomRidGKS0lJHNpbkdGLkYp.restart;A TrickWhat went wrong? Clearly, NiMsJiomJSJBRyIiIi0lJGNvc0c2IyUidEdGJkYmKiYlIkJHRiYtJSRzaW5HRilGJkYm solves the homogeneous problem.odetest(y(t)=A*cos(t)+B*sin(t),D(D(y))(t)+y(t)=0);Try the guess NiMvLSYlInhHNiMlInBHNiMlInRHKiZGKiIiIiwmKiYlIkFHRiwtJSRjb3NHRilGLEYsKiYlIkJHRiwtJSRzaW5HRilGLEYsRiw= and see what you get:Let us explore this last guess somewhat more. Consider the nonhomogeneous problem NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRiklInBHRik=NiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomJSJxR0YnLSUieEc2IyUidEdGJ0YnLCYqJiUiYUdGJy0lJGNvc0c2IyomJSViZXRhR0YnRi9GJ0YnRicqJiUiYkdGJy0lJHNpbkdGNUYnRic= where NiMlInBH and NiMlInFH are real numbers, NiMlJWJldGFH > 0 and NiMyIiIhLCYqJCUiYUciIiMiIiIqJCUiYkdGKEYp. We ask for conditions under which the guess NiM+LSUieUc2IyUidEcqJkYnIiIiLCYqJiUiQUdGKS0lJGNvc0c2IyomJSViZXRhR0YpRidGKUYpRikqJiUiQkdGKS0lJHNpbkdGL0YpRilGKQ== works. To this end we insert NiMlInlH into the differential equation.restart;y(t):=t*(A*cos(beta*t)+B*sin(beta*t));diff(y(t),t$2)+p*diff(y(t),t)+q*y(t)=a*cos(beta*t)+b*sin(beta*t);This yields the following four conditions for NiMlInBH, NiMlInFH, NiMlIkFH and NiMlIkJH:NiMqJiUidEciIiItJSRjb3NHNiMqJiUlYmV0YUdGJUYkRiVGJQ==: NiMvLCgqJiUiQUciIiIqJCUlYmV0YUciIiNGJyEiIiooJSJwR0YnJSJCR0YnRilGJ0YnKiYlInFHRidGJkYnRiciIiE=,NiMqJiUidEciIiItJSRzaW5HNiMqJiUlYmV0YUdGJUYkRiVGJQ==: NiMvLCgqJiUiQkciIiIqJCUlYmV0YUciIiNGJyEiIiooJSJwR0YnJSJBR0YnRilGJ0YrKiYlInFHRidGJkYnRiciIiE=,NiMtJSRjb3NHNiMqJiUlYmV0YUciIiIlInRHRig=: NiMvLCYqKCIiIyIiIiUiQkdGJyUlYmV0YUdGJ0YnKiYlInBHRiclIkFHRidGJyUiYUc=,NiMtJSRzaW5HNiMqJiUlYmV0YUciIiIlInRHRig=: NiMvLCYqKCIiIyIiIiUiQUdGJyUlYmV0YUdGJyEiIiomJSJwR0YnJSJCR0YnRiclImJH. solve({-A*beta^2+p*B*beta+q*A=0,
-B*beta^2-p*A*beta+q*B=0,
2*B*beta+p*A=a,
-2*A*beta+p*B=b},{q,p,B,A});Note that NiMsJiomJSJhRyIiIi0lJGNvc0c2IyomJSViZXRhR0YmJSJ0R0YmRiZGJiomJSJiR0YmLSUkc2luR0YpRiZGJg== solves NiMvLCYqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YnISIiRikqJiUlYmV0YUdGJy1GKDYjJSJ0R0YpRikiIiE= as the following showswith(DEtools):odetest(z(t)=a*cos(beta*t)+b*sin(beta*t),D(D(z))(t)+beta^2*z(t)=0);consequently, one concludes that the guess NiMqJiUidEciIiIsJiomJSJBR0YlLSUkY29zRzYjKiYlJWJldGFHRiVGJEYlRiVGJSomJSJCR0YlLSUkc2luR0YrRiVGJUYl only works in case that NiMsJiomJSJBRyIiIi0lJGNvc0c2IyomJSViZXRhR0YmJSJ0R0YmRiZGJiomJSJCR0YmLSUkc2luR0YpRiZGJg== solves the homogeneous problem. The Resonance CaseConsider a second order linear differential equationNiMqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YlISIi +NiMlImFHNiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomJSJiR0YnJSJ4R0YnRictJSJmRzYjJSJ0Rw==where a, b are real numbers, and NiMtJSJmRzYjJSJ0Rw== has the form NiMvLSUiZkc2IyUidEcsJiooLSYlInBHNiMlIm5HRiYiIiItJSRleHBHNiMqJiUmYWxwaGFHRi9GJ0YvRi8tJSRjb3NHNiMqJiUlYmV0YUdGL0YnRi9GL0YvKigtJiUicUdGLUYmRi9GMEYvLSUkc2luR0Y3Ri9GLw== with NiQlJmFscGhhRyUlYmV0YUc= real numbers and NiMmJSJwRzYjJSJuRw==, NiMmJSJxRzYjJSJuRw== polynomials in t of degree less than or equal to NiMlIm5H.Step 1. Set up standard trial function.Step 2. Check whether any term solves the homogeneous d.e.Step 3. If so, multiply by t and go to Step 2.Step 4. If not, determine coefficients by inserting the improved trial function and its derivatives into the de.Guesses for Other Forcing FunctionsFind a particular solution for the following differential equations.a)NiMvLCgqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YnISIiRikqJiUjZHhHRilGK0YsRiwqJiIiJ0YpLUYoNiMlInRHRilGLComIiM1RiktJSRleHBHNiMqJkYnRilGM0YpRik=restart;b)NiMsJiomKiYpJSJkRyIiIyIiIiUieEdGKUYpKiQpJSNkdEdGKEYpISIiRikiIiRGLg==NiMvKiYlI2R4RyIiIiUjZHRHISIiKiYiI2tGJiwmKiQpJSJ0RyIiJEYmRiYqJClGLiIiI0YmRihGJg==restart;c)NiMvLCYqKCUiZEciIiMlInhHIiIiKiQlI2R0R0YnISIiRikqJiIiJUYpLUYoNiMlInRHRilGKSooRidGKSokRjFGJ0YpLSUkc2luRzYjKiZGJ0YpRjFGKUYprestart;