ORDINARY DIFFERENTIAL EQUATIONS POWERTOOLLesson 4 -- First-Order Linear EquationsProf. Douglas B. MeadeIndustrial Mathematics InstituteDepartment of MathematicsUniversity of South CarolinaColumbia, SC 29208
URL: http://www.math.sc.edu/~meade/E-mail: meade@math.sc.eduCopyright \251 2001 by Douglas B. MeadeAll rights reserved-------------------------------------------------------------------<Text-field layout="Heading 1" style="Heading 1">Outline of Lesson 4</Text-field>4.A Structure of Solutiosn to Linear ODEs4.B Integrating Factor for a First-Order Linear ODE<Text-field layout="Heading 1" style="Heading 1">Initialization</Text-field>restart;with( DEtools ):with( plots ):<Text-field bookmark="4.A" layout="Heading 1" style="Heading 1">4.A Structure of Solutions to Linear ODEs</Text-field>The general first-order linear ODE islin_ode := diff( x(t), t ) + p(t) * x(t) = f(t);The dependent function NiMtJSJ4RzYjJSJ0Rw== and its first derivative, NiMqJiUjZHhHIiIiJSNkdEchIiI=, appear linearly, that is, appear as a linear combination with variable coefficients. Note that, in general, this is not a separable ODE, as Maple shows viaodeadvisor( lin_ode, [separable] );If NiMtJSJwRzYjJSJ0Rw== and NiMtJSJmRzYjJSJ0Rw== are both constants, then the ODE is separable, in which case the solution can be found as in Lesson 3. The constant-coefficient linear equationlin_ode_const := subs( p(t)=a, f(t)=b, lin_ode );is verified separable by Maple viaodeadvisor( lin_ode_const, [separable] );Maple's solution process can be seen withinfolevel[dsolve] := 3:lin_ode_const_soln := dsolve( lin_ode_const, x(t) );infolevel[dsolve] := 0:The structure of this solution is important. The term involving the constant of integration, that is, the termsoln_h := x(t) = coeff(rhs(lin_ode_const_soln),_C1);is a solution of the homogenous ODE (i.e., NiMvJSJiRyIiIQ==). This is verified viaodetest( soln_h, subs( b=0, lin_ode_const ) );The constant term, namely,soln_p := x(t) = subs( _C1=0, rhs(lin_ode_const_soln) );is a solution to the non-homogeneous ODE, as is seen viaodetest( soln_p, lin_ode_const );Any solution that satisfies the full ODE is called a particular solution. It is a general property of linear equations that the general solution can be written as the sum of the general solution to the homogeneous equation and any (particular) solution to the non-homogeneous equation. This structure will appear again when linear equations of higher-order, and linear systems of first-order ODEs are studied.<Text-field bookmark="4.B" layout="Heading 1" style="Heading 1">4.B Integrating Factor for a First-Order Linear ODE</Text-field>Knowledge of the structure of solutions to linear ODEs is important, but does not provide too much information about finding solutions to the general first-order linear ODENiMvLCYqJiUjZHhHIiIiJSNkdEchIiJGJyomLSUicEc2IyUidEdGJy0lInhHRi1GJ0YnLSUiZkdGLQ==A procedure for solving the first-order linear ODE consists of finding an integrating factor, NiMtJSNtdUc2IyUidEc=, for the ODE. An integrating factor is a function NiMtJSNtdUc2IyUidEc= that, upon multiplication against the left-hand side of the equation, renders the product an exact derivative. Thus, the integrating factor NiMtJSNtdUc2IyUidEc= is characterized by the property thatNiMvKiYsJi0lI3gnRzYjJSJ0RyIiIiomLSUicEdGKEYqLSUieEdGKEYqRipGKi0lI211R0YoRioqJiUiZEdGKiUjZHRHISIiNiMtJSFHNiMqJi0lI211RzYjJSJ0RyIiIi0lInhHRilGKw==In other words, NiMtJSNtdUc2IyUidEc= is a factor that allows the left-hand side of the ODE to be written as the derivative of the product NiMqJi0lI211RzYjJSJ0RyIiIi0lInhHRiZGKA==. The general formula for the integrating factor for the first-order linear ODE isNiMvLSUjbXVHNiMlInRHLSUkZXhwRzYjLSUkaW50RzYkLSUicEdGJkYn.Multiplication of the ODE by this factor leads to an equation of the formNiMvLSUlZGlmZkc2JC0lIlhHNiMlInRHRiotJSJGR0Ypwhere NiMvLSUiWEc2IyUidEcqJi0lI211R0YmIiIiLSUieEdGJkYr and NiMvLSUiRkc2IyUidEcqJi0lI211R0YmIiIiLSUiZkdGJkYr. The explicit general solution of this equation can be found by direct integration to beNiMtJSJYRzYjJSJ0Rw== = NiMtJSRJbnRHNiQtJSVkaWZmRzYkLSUiWEc2IyUidEdGLEYs = NiMsJi0lJEludEc2JC0lIkZHNiMlInRHRioiIiIlIkNHRis=.Thus, NiMvKiYtJSJ4RzYjJSJ0RyIiIi0lI211R0YnRiksJi0lJGludEc2JComLSUiZkdGJ0YpRipGKUYoRiklIkNHRik=and the solution to the original ODE is found usingNiMvLSUieEc2IyUidEcqJi0lIlhHRiYiIiItJSNtdUdGJiEiIg== = NiMqJiwmLSUkaW50RzYkKiYtJSJmRzYjJSJ0RyIiIi0lI211R0YrRi1GLEYtJSJDR0YtRi1GLiEiIg== = NiMsJiomLSUkZXhwRzYjLCQtJSRpbnRHNiQlInBHJSJ0RyEiIiIiIi1GKjYkKiYtJSJmRzYjRi1GLy1GJjYjRilGL0YtRi9GLyomJSJDR0YvRiVGL0YvInstead of focusing on the general formula, implement the solution process for each specific problem.For example, consider the specific first-order linear ODElin_ode1 := diff( x(t), t ) + x(t)/(t+1) = ln(t)/(t+1);In this problem, NiMvLSUicEc2IyUidEcqJiIiIkYpLCZGJ0YpRilGKSEiIg== and NiMvLSUiZkc2IyUidEcqJi0lI2xuR0YmIiIiLCZGJ0YrRitGKyEiIg==. Thus, the integrating factor isint_fact := mu(t) = exp( Int( 1/(t+1), t ) );which evaluates toint_fact1 := value( int_fact );The DEtools package contains intfactor, a procedure that will find an integrating factor for problems of this type. It givesintfactor( lin_ode1 );which is exactly what was obtained above.Multiplication of the ODE by this integrating factor yieldsode2 := subs( int_fact1, mu(t)*lin_ode1 );While this equation is rather complicated, the definition of the integrating factor allows us to replace the left-hand side with the single derivativeode3 := subs( int_fact1, Diff( mu(t)*x(t), t ) ) = rhs(ode2);Maple cannot make this transformation in the "forward" direction, but can verify it "in reverse." Simply evaluate the derivative on the left to obtainexpand(convert(ode3,diff));which compares favorably with simplify(ode2);The equation ode3;can be solved by direct integration, that is, by antidifferentiation of both sides. The result isint_ode3 := map(Int, ode3, t );The left-hand side is trivial to evaluate, and Maple does a fine job with the right-hand side. After evaluating these indefinite integrals and adding the constant of integration, the result isq1 := subs( int_fact1, mu(t)*x(t) ) = int( rhs(ode3), t ) + C;The explicit general solution to the given first-order linear ODE is thereforeexpl_soln := op(solve( q1, {x(t)} ));That this solution satisfies the original differential equation is confirmed withodetest( expl_soln, lin_ode1 );To emphasize the structure of this solution, the homogeneous and particular solutions are respectivelysoln_h := x(t) = coeff( rhs(expl_soln), C );soln_p := x(t) = subs( C=0, rhs(expl_soln));as confirmed byodetest( soln_h, lhs(lin_ode1)=0 );odetest( soln_p, lin_ode1 );[Back to ODE Powertool Table of Contents]