ORDINARY DIFFERENTIAL EQUATIONS POWERTOOLLesson 10 -- Substitution and Change of VariablesProf. 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"><Font family="Times New Roman">Outline of Lesson 10</Font></Text-field>10.A Example 1: Homogeneous Equations10.B Example 2: Bernoulli Equations10.C Example 3: Reduction to Separation of Variables10.D Example 4: Riccati Equations<Text-field layout="Heading 1" style="Heading 1"><Font family="Times New Roman">Initialization</Font></Text-field>restart;with( DEtools ):with( plots ):with( PDEtools ):<Text-field bookmark="10.A" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.A Example 1: Homogeneous Equations</Font></Text-field>A function NiMtJSJmRzYkJSJ4RyUieUc= is said to be homogeneous of degree NiMlImtH if NiMvLSUiZkc2JComJSJ0RyIiIiUieEdGKSomRihGKSUieUdGKSomKUYoJSJrR0YpLUYlNiRGKkYsRik=. Thus, if the variables NiMlInhH and NiMlInlH are replaced by NiMqJiUidEciIiIlInhHRiU= and NiMqJiUidEciIiIlInlHRiU=, respectively, a factor of NiMpJSJ0RyUia0c= can be extracted, and the remaining factor is just NiMtJSJmRzYkJSJ4RyUieUc=. A homogeneous differential equation has the general formode1 := M(x,y(x)) + N(x,y(x)) * diff( y(x),x ) = 0;where the functions M and N are both homogeneous of the same degree. Thus, there exists a constant NiMlJmFscGhhRw== such thatNiMvLSUiTUc2JComJSJ0RyIiIiUieEdGKSomRihGKSUieUdGKSomKUYoJSZhbHBoYUdGKS1GJTYkRipGLEYpand NiMvLSUiTkc2JComJSJ0RyIiIiUieEdGKSomRihGKSUieUdGKSomKUYoJSZhbHBoYUdGKS1GJTYkRipGLEYpFor example, consider the functionsM := (x,y) -> x^2+y^2:
N := (x,y) -> x^2-x*y:
'M'(x,y) = M(x,y);
'N'(x,y) = N(x,y);which produce the differential equationode1;To check that this is a homogeneous ODE, observe that 'M'(tx,ty) = simplify( M(t*x,t*y) / M(x,y) ) * 'M'(x,y);'N'(tx,ty) = simplify( N(t*x,t*y) / N(x,y) ) * 'N'(x,y);To find the general solution to this ODE, introduce the change of variablesch_of_var := y(x) = x * u(x);The ODE becomesq1 := dchange( ch_of_var, ode1, [u(x)] );This simplifies tosep_ode1 := simplify( isolate( q1, diff(u(x),x) ) );which is easily seen to be a separable equationodeadvisor( sep_ode1 );The (implicit) solution to this equation issol_u := dsolve( sep_ode1, u(x), [separable], implicit );Reversing the change of variables, the solution to the original ODE issol_y := dchange( isolate(ch_of_var,u(x)), sol_u, [y(x)] );That this equation defines a solution is confirmed withodetest( sol_y, ode1 );Note that Maple's built-in commands can be used, first to classify this ODE as homogeneous:odeadvisor( ode1 );then to find the general solution in the explicit formexpl_sol := genhomosol( ode1 );However, people are not familiar with the Lambert W function. To obtain the solution of this homogeneous ODE in an implicit form, usedsolve( ode1, y(x), [homogeneous], implicit );which is seen to be equivalent to the previous solution.<Text-field bookmark="10.B" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.B Example 2: Bernoulli Equations</Font></Text-field>A Bernoulli equation has the formdiff( x(t), t ) = f(t) * x(t) + g(t) * x(t)^alpha;for known functions f and g and a constant NiMlJmFscGhhRw== (not equal to 0 or 1).For example, consider the differential equationode2 := diff( x(t), t ) = a * x(t) - b * x(t)^3;where NiMlImFH and NiMlImJH are real constants with NiMwJSJhRyIiIQ==. This is a Bernoulli equation withalpha := 3;To convert the Bernoulli equation into a first-order linear ODE, consider the substitutionch_of_var := x(t) = u(t)^(1/(1-alpha));The ODE for the new function NiMtJSJ1RzYjJSJ0Rw== isq1 := dchange( ch_of_var, ode2, [u(t)] );which simplifies tolin_ode := simplify( isolate( q1, diff(u(t),t) ));The solution to this linear ODE islin_sol := dsolve( lin_ode, u(t), [linear] );and the corresponding implicit solution for the original function NiMtJSJ4RzYjJSJ0Rw== issol2 := dchange( isolate(ch_of_var,u(t)), lin_sol, [x(t)] );To verify that this is a solution of the original ODE, useodetest( sol2, ode2 );The solution might be a little more useful in the formsol2a := map( u->simplify(1/u), sol2 );Immediate access to the solution of this Bernoulli equations can be obtained with the single commanddsolve( ode2, x(t), [Bernoulli], implicit );from which either of the above implicit solutions, or the explicit solution, can be derived.The bernoullisol command yields the two branches of the square root that are solutions. The result isbernoullisol( ode2 );The choice of branch depends on the signs of NiMlImFH, NiMlImJH, and the initial condition.<Text-field bookmark="10.C" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.C Example 3: Reduction to Separation of Variables</Font></Text-field>Any ODE of the formDiff( y, x ) = F( a*x + b*y + c );with NiMwJSJiRyIiIQ== can be reduced to a separable ODE via the substitution NiMvJSJ1RywoKiYlImFHIiIiJSJ4R0YoRigqJiUiYkdGKC0lInlHNiNGKUYoRiglImNHRig=.For example, the ODEode3 := diff( y(x), x ) = ( x+y(x)+2 )^2;is of the appropriate form with NiMvJSJhRyIiIg==, NiMvJSJiRyIiIg==, NiMvJSJjRyIiIw==, and NiMvLSUiRkc2IyUiekcqJEYnIiIj. Thus, the substitutionch_of_var := u(x) = x + y(x) + 2;leads to a differential equation for NiMtJSJ1RzYjJSJ4Rw==. This equation isu_ode := dchange( isolate(ch_of_var,y(x)), ode3, [u(x)] );which is easily seen to be separable via the syntaxodeadvisor( u_ode, [separable] );The implicit general solution to this separable differential equation isu_sol := dsolve( u_ode, u(x), [separable], implicit );The corresponding explicit solution isu_sol_expl := dsolve( u_ode, u(x), [separable] );Reversing the substitution to obtain the implicit general solution to the differential equation for NiMtJSJ5RzYjJSJ4Rw== givessol3 := dchange( ch_of_var, u_sol, [y(x)] );The corresponding explicit solution can be obtained fromsol3_expl := isolate( sol3, y(x) );Note that simply usingdchange( ch_of_var, u_sol_expl, [y(x)] );does not produce an explicit formula for the general solution. It is still necessary to use isolate, or something similar, as is seen fromisolate( dchange( ch_of_var, u_sol_expl, [y(x)] ), y(x) );That these functions are solutions to the original ODE is seen from either ofodetest( sol3, ode3 );odetest( sol3_expl, ode3 );Immediate access to the implicit and explicit solutions can be obtained usingdsolve( ode3, y(x), implicit );anddsolve( ode3, y(x) );<Text-field bookmark="10.D" layout="Heading 1" style="Heading 1"><Font family="Times New Roman">10.D Example 4: Riccati Equations</Font></Text-field>A Riccati equation has the formdiff( x(t), t ) = f(t) * x(t)^2 + g(t) * x(t) + h(t);for given functions f, g, and h. The solution of a Ricatti equation requires knowledge of a particular solution to the ODE.For example, consider the equationode4 := diff( x(t), t ) = -x(t)^2 + 2*t*x(t) - t^2+5;which has as one of its solutions the functionX := t-2;That this is a solution is confirmed byodetest( x(t)=X, ode4 );To solve a Riccati equation, define a new function NiMtJSJ1RzYjJSJ0Rw== such that,ch_of_var := u(t) = x(t) - X;This substitution translates the ODE for NiMtJSJ4RzYjJSJ0Rw== into one for the new function NiMtJSJ1RzYjJSJ0Rw==, and results in the equationode_u := dchange( isolate(ch_of_var,x(t)), ode4, [u(t)] );which simplifies tobern_ode := collect( isolate( ode_u, diff(u(t),t) ), u(t) );Upon inspection, this ODE is seen to be a Bernoulli equation via the syntaxodeadvisor( bern_ode, [Bernoulli] );Its solution usbern_sol := dsolve( bern_ode, u(t), [Bernoulli] );Reversing the substitution givessol4 := dchange( ch_of_var, bern_sol, [x(t)] );To check that this is a solution to the original ODE, useodetest( sol4, ode4 );Note that the original equation can be classified as a Riccati equation usingodeadvisor( ode4, [Riccati] );and solved in one step using eitherriccatisol( ode4 );ordsolve( ode4, x(t), [Riccati] );[Back to ODE Powertool Table of Contents]