1.56 problem 56

1.56.1 Solving as second order ode quadrature ode
1.56.2 Solving as second order linear constant coeff ode
1.56.3 Solving as second order integrable as is ode
1.56.4 Solving as second order ode missing y ode
1.56.5 Solving using Kovacic algorithm
1.56.6 Solving as exact linear second order ode ode
1.56.7 Maple step by step solution

Internal problem ID [7100]
Internal file name [OUTPUT/6086_Sunday_June_05_2022_04_19_04_PM_45789474/index.tex]

Book: Own collection of miscellaneous problems
Section: section 1.0
Problem number: 56.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "kovacic", "exact linear second order ode", "second_order_integrable_as_is", "second_order_ode_missing_y", "second_order_ode_quadrature", "second_order_linear_constant_coeff"

Maple gives the following as the ode type

[[_2nd_order, _quadrature]]

\[ \boxed {y^{\prime \prime }=f \left (t \right )} \]

1.56.1 Solving as second order ode quadrature ode

Integrating once gives \[ y^{\prime }= \int f \left (t \right )d t + c_{1} \] Integrating again gives \[ y= \int \left (\int f \left (t \right )d t\right ) \,dt + c_{1} x + c_{2} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \\ \end{align*}

Verification of solutions

\[ y = \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \] Verified OK.

1.56.2 Solving as second order linear constant coeff ode

This is second order non-homogeneous ODE. In standard form the ODE is \[ A y''(t) + B y'(t) + C y(t) = f(t) \] Where \(A=1, B=0, C=0, f(t)=f \left (t \right )\). Let the solution be \[ y = y_h + y_p \] Where \(y_h\) is the solution to the homogeneous ODE \( A y''(t) + B y'(t) + C y(t) = 0\), and \(y_p\) is a particular solution to the non-homogeneous ODE \(A y''(t) + B y'(t) + C y(t) = f(t)\). \(y_h\) is the solution to \[ y^{\prime \prime } = 0 \] This is second order with constant coefficients homogeneous ODE. In standard form the ODE is \[ A y''(t) + B y'(t) + C y(t) = 0 \] Where in the above \(A=1, B=0, C=0\). Let the solution be \(y=e^{\lambda t}\). Substituting this into the ODE gives \[ \lambda ^{2} {\mathrm e}^{\lambda t} = 0 \tag {1} \] Since exponential function is never zero, then dividing Eq(2) throughout by \(e^{\lambda t}\) gives \[ \lambda ^{2} = 0 \tag {2} \] Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form.Using the quadratic formula \[ \lambda _{1,2} = \frac {-B}{2 A} \pm \frac {1}{2 A} \sqrt {B^2 - 4 A C} \] Substituting \(A=1, B=0, C=0\) into the above gives \begin {align*} \lambda _{1,2} &= \frac {0}{(2) \left (1\right )} \pm \frac {1}{(2) \left (1\right )} \sqrt {\left (0\right )^2 - (4) \left (1\right )\left (0\right )}\\ &= 0 \end {align*}

Hence this is the case of a double root \(\lambda _{1,2} = 0\). Therefore the solution is \[ y= c_{1} 1 + c_{2} t \tag {1} \] Therefore the homogeneous solution \(y_h\) is \[ y_h = c_{2} t +c_{1} \] The particular solution \(y_p\) can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on \(t\) as well. Let \begin{equation} \tag{1} y_p(t) = u_1 y_1 + u_2 y_2 \end{equation} Where \(u_1,u_2\) to be determined, and \(y_1,y_2\) are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as \begin{align*} y_1 &= 1 \\ y_2 &= t \\ \end{align*} In the Variation of parameters \(u_1,u_2\) are found using \begin{align*} \tag{2} u_1 &= -\int \frac {y_2 f(t)}{a W(t)} \\ \tag{3} u_2 &= \int \frac {y_1 f(t)}{a W(t)} \\ \end{align*} Where \(W(t)\) is the Wronskian and \(a\) is the coefficient in front of \(y''\) in the given ODE. The Wronskian is given by \(W= \begin {vmatrix} y_1 & y_{2} \\ y_{1}^{\prime } & y_{2}^{\prime } \end {vmatrix} \). Hence \[ W = \begin {vmatrix} 1 & t \\ \frac {d}{dt}\left (1\right ) & \frac {d}{dt}\left (t\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} 1 & t \\ 0 & 1 \end {vmatrix} \] Therefore \[ W = \left (1\right )\left (1\right ) - \left (t\right )\left (0\right ) \] Which simplifies to \[ W = 1 \] Which simplifies to \[ W = 1 \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {f \left (t \right ) t}{1}\,dt \] Which simplifies to \[ u_1 = - \int f \left (t \right ) t d t \] Hence \[ u_1 = -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right ) \] And Eq. (3) becomes \[ u_2 = \int \frac {f \left (t \right )}{1}\,dt \] Which simplifies to \[ u_2 = \int f \left (t \right )d t \] Hence \[ u_2 = \int _{0}^{t}f \left (\alpha \right )d \alpha \] Therefore the particular solution, from equation (1) is \[ y_p(t) = -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (c_{2} t +c_{1}\right ) + \left (-\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t\right ) \\ \end{align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= c_{2} t +c_{1} -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t \\ \end{align*}

Verification of solutions

\[ y = c_{2} t +c_{1} -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t \] Verified OK.

1.56.3 Solving as second order integrable as is ode

Integrating both sides of the ODE w.r.t \(t\) gives \begin {align*} \int y^{\prime \prime }d t &= \int f \left (t \right )d t\\ y^{\prime } = \int f \left (t \right )d t + c_{1} \end {align*}

Which is now solved for \(y\). Integrating both sides gives \begin {align*} y = \int \left (\int f \left (t \right )d t +c_{1} \right )d t +c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \int \left (\int f \left (t \right )d t +c_{1} \right )d t +c_{2} \\ \end{align*}

Verification of solutions

\[ y = \int \left (\int f \left (t \right )d t +c_{1} \right )d t +c_{2} \] Verified OK.

1.56.4 Solving as second order ode missing y ode

This is second order ode with missing dependent variable \(y\). Let \begin {align*} p(t) &= y^{\prime } \end {align*}

Then \begin {align*} p'(t) &= y^{\prime \prime } \end {align*}

Hence the ode becomes \begin {align*} p^{\prime }\left (t \right )-f \left (t \right ) = 0 \end {align*}

Which is now solve for \(p(t)\) as first order ode. Integrating both sides gives \begin {align*} p \left (t \right ) = \int f \left (t \right )d t +c_{1} \end {align*}

Since \(p=y^{\prime }\) then the new first order ode to solve is \begin {align*} y^{\prime } = \int f \left (t \right )d t +c_{1} \end {align*}

Writing the ode as \begin {align*} y^{\prime }&=\int f \left (t \right )d t +c_{1}\\ y^{\prime }&= \omega \left ( t,y\right ) \end {align*}

The condition of Lie symmetry is the linearized PDE given by \begin {align*} \eta _{t}+\omega \left ( \eta _{y}-\xi _{t}\right ) -\omega ^{2}\xi _{y}-\omega _{t}\xi -\omega _{y}\eta =0\tag {A} \end {align*}

The type of this ode is not in the lookup table. To determine \(\xi ,\eta \) then (A) is solved using ansatz. Making bivariate polynomials of degree 1 to use as anstaz gives \begin{align*} \tag{1E} \xi &= t a_{2}+y a_{3}+a_{1} \\ \tag{2E} \eta &= t b_{2}+y b_{3}+b_{1} \\ \end{align*} Where the unknown coefficients are \[ \{a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}\} \] Substituting equations (1E,2E) and \(\omega \) into (A) gives \begin{equation} \tag{5E} b_{2}+\left (\int f \left (t \right )d t +c_{1} \right ) \left (b_{3}-a_{2}\right )-\left (\int f \left (t \right )d t +c_{1} \right )^{2} a_{3}-f \left (t \right ) \left (t a_{2}+y a_{3}+a_{1}\right ) = 0 \end{equation} Putting the above in normal form gives \[ -f \left (t \right ) t a_{2}-f \left (t \right ) y a_{3}-\left (\int f \left (t \right )d t \right )^{2} a_{3}-2 \left (\int f \left (t \right )d t \right ) c_{1} a_{3}-c_{1}^{2} a_{3}-f \left (t \right ) a_{1}-\left (\int f \left (t \right )d t \right ) a_{2}+\left (\int f \left (t \right )d t \right ) b_{3}-c_{1} a_{2}+c_{1} b_{3}+b_{2} = 0 \] Setting the numerator to zero gives \begin{equation} \tag{6E} -f \left (t \right ) t a_{2}-f \left (t \right ) y a_{3}-\left (\int f \left (t \right )d t \right )^{2} a_{3}-2 \left (\int f \left (t \right )d t \right ) c_{1} a_{3}-c_{1}^{2} a_{3}-f \left (t \right ) a_{1}-\left (\int f \left (t \right )d t \right ) a_{2}+\left (\int f \left (t \right )d t \right ) b_{3}-c_{1} a_{2}+c_{1} b_{3}+b_{2} = 0 \end{equation} Looking at the above PDE shows the following are all the terms with \(\{t, y\}\) in them. \[ \{t, y, \int f \left (t \right )d t, f \left (t \right )\} \] The following substitution is now made to be able to collect on all terms with \(\{t, y\}\) in them \[ \{t = v_{1}, y = v_{2}, \int f \left (t \right )d t = v_{3}, f \left (t \right ) = v_{4}\} \] The above PDE (6E) now becomes \begin{equation} \tag{7E} -c_{1}^{2} a_{3}-2 c_{1} a_{3} v_{3}-v_{4} v_{1} a_{2}-v_{4} v_{2} a_{3}-v_{3}^{2} a_{3}-c_{1} a_{2}+c_{1} b_{3}-v_{4} a_{1}-v_{3} a_{2}+v_{3} b_{3}+b_{2} = 0 \end{equation} Collecting the above on the terms \(v_i\) introduced, and these are \[ \{v_{1}, v_{2}, v_{3}, v_{4}\} \] Equation (7E) now becomes \begin{equation} \tag{8E} -v_{4} v_{1} a_{2}-v_{4} v_{2} a_{3}-v_{3}^{2} a_{3}+\left (-2 c_{1} a_{3}-a_{2}+b_{3}\right ) v_{3}-v_{4} a_{1}-c_{1}^{2} a_{3}-c_{1} a_{2}+c_{1} b_{3}+b_{2} = 0 \end{equation} Setting each coefficients in (8E) to zero gives the following equations to solve \begin {align*} -a_{1}&=0\\ -a_{2}&=0\\ -a_{3}&=0\\ -2 c_{1} a_{3}-a_{2}+b_{3}&=0\\ -c_{1}^{2} a_{3}-c_{1} a_{2}+c_{1} b_{3}+b_{2}&=0 \end {align*}

Solving the above equations for the unknowns gives \begin {align*} a_{1}&=0\\ a_{2}&=0\\ a_{3}&=0\\ b_{1}&=b_{1}\\ b_{2}&=0\\ b_{3}&=0 \end {align*}

Substituting the above solution in the anstaz (1E,2E) (using \(1\) as arbitrary value for any unknown in the RHS) gives \begin{align*} \xi &= 0 \\ \eta &= 1 \\ \end{align*} The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( t,y\right ) \to \left ( R,S \right )\) where \(\left ( R,S \right )\) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is \begin {align*} \frac {d t}{\xi } &= \frac {d y}{\eta } = dS \tag {1} \end {align*}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial t} + \eta \frac {\partial }{\partial y}\right ) S(t,y) = 1\). Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable \(R\) in the canonical coordinates, where \(S(R)\). Since \(\xi =0\) then in this special case \begin {align*} R = t \end {align*}

\(S\) is found from \begin {align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{1}} dy \end {align*}

Which results in \begin {align*} S&= y \end {align*}

Now that \(R,S\) are found, we need to setup the ode in these coordinates. This is done by evaluating \begin {align*} \frac {dS}{dR} &= \frac { S_{t} + \omega (t,y) S_{y} }{ R_{t} + \omega (t,y) R_{y} }\tag {2} \end {align*}

Where in the above \(R_{t},R_{y},S_{t},S_{y}\) are all partial derivatives and \(\omega (t,y)\) is the right hand side of the original ode given by \begin {align*} \omega (t,y) &= \int f \left (t \right )d t +c_{1} \end {align*}

Evaluating all the partial derivatives gives \begin {align*} R_{t} &= 1\\ R_{y} &= 0\\ S_{t} &= 0\\ S_{y} &= 1 \end {align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates. \begin {align*} \frac {dS}{dR} &= \int f \left (t \right )d t +c_{1}\tag {2A} \end {align*}

We now need to express the RHS as function of \(R\) only. This is done by solving for \(t,y\) in terms of \(R,S\) from the result obtained earlier and simplifying. This gives \begin {align*} \frac {dS}{dR} &= \int f \left (R \right )d R +c_{1} \end {align*}

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates \(R,S\). Integrating the above gives \begin {align*} S \left (R \right ) = \int \left (\int f \left (R \right )d R \right )d R +c_{1} R +c_{2}\tag {4} \end {align*}

To complete the solution, we just need to transform (4) back to \(t,y\) coordinates. This results in \begin {align*} y = \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \end {align*}

Which simplifies to \begin {align*} y = \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \end {align*}

Which gives \begin {align*} y = \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \\ \end{align*}

Verification of solutions

\[ y = \int \left (\int f \left (t \right )d t \right )d t +c_{1} t +c_{2} \] Verified OK.

1.56.5 Solving using Kovacic algorithm

Writing the ode as \begin {align*} y^{\prime \prime } &= 0 \tag {1} \\ A y^{\prime \prime } + B y^{\prime } + C y &= 0 \tag {2} \end {align*}

Comparing (1) and (2) shows that \begin {align*} A &= 1 \\ B &= 0\tag {3} \\ C &= 0 \end {align*}

Applying the Liouville transformation on the dependent variable gives \begin {align*} z(t) &= y e^{\int \frac {B}{2 A} \,dt} \end {align*}

Then (2) becomes \begin {align*} z''(t) = r z(t)\tag {4} \end {align*}

Where \(r\) is given by \begin {align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end {align*}

Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives \begin {align*} r &= \frac {0}{1}\tag {6} \end {align*}

Comparing the above to (5) shows that \begin {align*} s &= 0\\ t &= 1 \end {align*}

Therefore eq. (4) becomes \begin {align*} z''(t) &= 0 \tag {7} \end {align*}

Equation (7) is now solved. After finding \(z(t)\) then \(y\) is found using the inverse transformation \begin {align*} y &= z \left (t \right ) e^{-\int \frac {B}{2 A} \,dt} \end {align*}

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table summarizes these cases.

Case

Allowed pole order for \(r\)

Allowed value for \(\mathcal {O}(\infty )\)

1

\(\left \{ 0,1,2,4,6,8,\cdots \right \} \)

\(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \)

2

Need to have at least one pole that is either order \(2\) or odd order greater than \(2\). Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\).

no condition

3

\(\left \{ 1,2\right \} \)

\(\left \{ 2,3,4,5,6,7,\cdots \right \} \)

Table 33: Necessary conditions for each Kovacic case

The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore \begin {align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 0 - -\infty \\ &= \infty \end {align*}

There are no poles in \(r\). Therefore the set of poles \(\Gamma \) is empty. Since there is no odd order pole larger than \(2\) and the order at \(\infty \) is \(infinity\) then the necessary conditions for case one are met. Therefore \begin {align*} L &= [1] \end {align*}

Since \(r = 0\) is not a function of \(t\), then there is no need run Kovacic algorithm to obtain a solution for transformed ode \(z''=r z\) as one solution is \[ z_1(t) = 1 \] Using the above, the solution for the original ode can now be found. The first solution to the original ode in \(y\) is found from \[ y_1 = z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dt} \]

Since \(B=0\) then the above reduces to \begin{align*} y_1 &= z_1 \\ &= 1 \\ \end{align*} Which simplifies to \[ y_1 = 1 \] The second solution \(y_2\) to the original ode is found using reduction of order \[ y_2 = y_1 \int \frac { e^{\int -\frac {B}{A} \,dt}}{y_1^2} \,dt \] Since \(B=0\) then the above becomes \begin{align*} y_2 &= y_1 \int \frac {1}{y_1^2} \,dt \\ &= 1\int \frac {1}{1} \,dt \\ &= 1\left (t\right ) \\ \end{align*} Therefore the solution is

\begin{align*} y &= c_{1} y_1 + c_{2} y_2 \\ &= c_{1} \left (1\right ) + c_{2} \left (1\left (t\right )\right ) \\ \end{align*} This is second order nonhomogeneous ODE. Let the solution be \[ y = y_h + y_p \] Where \(y_h\) is the solution to the homogeneous ODE \( A y''(t) + B y'(t) + C y(t) = 0\), and \(y_p\) is a particular solution to the nonhomogeneous ODE \(A y''(t) + B y'(t) + C y(t) = f(t)\). \(y_h\) is the solution to \[ y^{\prime \prime } = 0 \] The homogeneous solution is found using the Kovacic algorithm which results in \[ y_h = c_{2} t +c_{1} \] The particular solution \(y_p\) can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on \(t\) as well. Let \begin{equation} \tag{1} y_p(t) = u_1 y_1 + u_2 y_2 \end{equation} Where \(u_1,u_2\) to be determined, and \(y_1,y_2\) are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as \begin{align*} y_1 &= 1 \\ y_2 &= t \\ \end{align*} In the Variation of parameters \(u_1,u_2\) are found using \begin{align*} \tag{2} u_1 &= -\int \frac {y_2 f(t)}{a W(t)} \\ \tag{3} u_2 &= \int \frac {y_1 f(t)}{a W(t)} \\ \end{align*} Where \(W(t)\) is the Wronskian and \(a\) is the coefficient in front of \(y''\) in the given ODE. The Wronskian is given by \(W= \begin {vmatrix} y_1 & y_{2} \\ y_{1}^{\prime } & y_{2}^{\prime } \end {vmatrix} \). Hence \[ W = \begin {vmatrix} 1 & t \\ \frac {d}{dt}\left (1\right ) & \frac {d}{dt}\left (t\right ) \end {vmatrix} \] Which gives \[ W = \begin {vmatrix} 1 & t \\ 0 & 1 \end {vmatrix} \] Therefore \[ W = \left (1\right )\left (1\right ) - \left (t\right )\left (0\right ) \] Which simplifies to \[ W = 1 \] Which simplifies to \[ W = 1 \] Therefore Eq. (2) becomes \[ u_1 = -\int \frac {f \left (t \right ) t}{1}\,dt \] Which simplifies to \[ u_1 = - \int f \left (t \right ) t d t \] Hence \[ u_1 = -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right ) \] And Eq. (3) becomes \[ u_2 = \int \frac {f \left (t \right )}{1}\,dt \] Which simplifies to \[ u_2 = \int f \left (t \right )d t \] Hence \[ u_2 = \int _{0}^{t}f \left (\alpha \right )d \alpha \] Therefore the particular solution, from equation (1) is \[ y_p(t) = -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t \] Therefore the general solution is \begin{align*} y &= y_h + y_p \\ &= \left (c_{2} t +c_{1}\right ) + \left (-\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t\right ) \\ \end{align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= c_{2} t +c_{1} -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t \\ \end{align*}

Verification of solutions

\[ y = c_{2} t +c_{1} -\left (\int _{0}^{t}f \left (\alpha \right ) \alpha d \alpha \right )+\left (\int _{0}^{t}f \left (\alpha \right )d \alpha \right ) t \] Verified OK.

1.56.6 Solving as exact linear second order ode ode

An ode of the form \begin {align*} p \left (t \right ) y^{\prime \prime }+q \left (t \right ) y^{\prime }+r \left (t \right ) y&=s \left (t \right ) \end {align*}

is exact if \begin {align*} p''(t) - q'(t) + r(t) &= 0 \tag {1} \end {align*}

For the given ode we have \begin {align*} p(x) &= 1\\ q(x) &= 0\\ r(x) &= 0\\ s(x) &= f \left (t \right ) \end {align*}

Hence \begin {align*} p''(x) &= 0\\ q'(x) &= 0 \end {align*}

Therefore (1) becomes \begin {align*} 0- \left (0\right ) + \left (0\right )&=0 \end {align*}

Hence the ode is exact. Since we now know the ode is exact, it can be written as \begin {align*} \left (p \left (t \right ) y^{\prime }+\left (q \left (t \right )-p^{\prime }\left (t \right )\right ) y\right )' &= s(x) \end {align*}

Integrating gives \begin {align*} p \left (t \right ) y^{\prime }+\left (q \left (t \right )-p^{\prime }\left (t \right )\right ) y&=\int {s \left (t \right )\, dt} \end {align*}

Substituting the above values for \(p,q,r,s\) gives \begin {align*} y^{\prime }&=\int {f \left (t \right )\, dt} \end {align*}

We now have a first order ode to solve which is \begin {align*} y^{\prime } = \int f \left (t \right )d t +c_{1} \end {align*}

Integrating both sides gives \begin {align*} y = \int \left (\int f \left (t \right )d t +c_{1} \right )d t +c_{2} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \int \left (\int f \left (t \right )d t +c_{1} \right )d t +c_{2} \\ \end{align*}

Verification of solutions

\[ y = \int \left (\int f \left (t \right )d t +c_{1} \right )d t +c_{2} \] Verified OK.

1.56.7 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y^{\prime }=f \left (t \right ) \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d t}y^{\prime } \\ \bullet & {} & \textrm {Characteristic polynomial of homogeneous ODE}\hspace {3pt} \\ {} & {} & r^{2}=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {0\pm \left (\sqrt {0}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =0 \\ \bullet & {} & \textrm {1st solution of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (t \right )=1 \\ \bullet & {} & \textrm {Repeated root, multiply}\hspace {3pt} y_{1}\left (t \right )\hspace {3pt}\textrm {by}\hspace {3pt} t \hspace {3pt}\textrm {to ensure linear independence}\hspace {3pt} \\ {} & {} & y_{2}\left (t \right )=t \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y=c_{1} y_{1}\left (t \right )+c_{2} y_{2}\left (t \right )+y_{p}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions of the homogeneous ODE}\hspace {3pt} \\ {} & {} & y=c_{1} +c_{2} t +y_{p}\left (t \right ) \\ \square & {} & \textrm {Find a particular solution}\hspace {3pt} y_{p}\left (t \right )\hspace {3pt}\textrm {of the ODE}\hspace {3pt} \\ {} & \circ & \textrm {Use variation of parameters to find}\hspace {3pt} y_{p}\hspace {3pt}\textrm {here}\hspace {3pt} f \left (t \right )\hspace {3pt}\textrm {is the forcing function}\hspace {3pt} \\ {} & {} & \left [y_{p}\left (t \right )=-y_{1}\left (t \right ) \left (\int \frac {y_{2}\left (t \right ) f \left (t \right )}{W \left (y_{1}\left (t \right ), y_{2}\left (t \right )\right )}d t \right )+y_{2}\left (t \right ) \left (\int \frac {y_{1}\left (t \right ) f \left (t \right )}{W \left (y_{1}\left (t \right ), y_{2}\left (t \right )\right )}d t \right ), f \left (t \right )=f \left (t \right )\right ] \\ {} & \circ & \textrm {Wronskian of solutions of the homogeneous equation}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (t \right ), y_{2}\left (t \right )\right )=\left [\begin {array}{cc} 1 & t \\ 0 & 1 \end {array}\right ] \\ {} & \circ & \textrm {Compute Wronskian}\hspace {3pt} \\ {} & {} & W \left (y_{1}\left (t \right ), y_{2}\left (t \right )\right )=1 \\ {} & \circ & \textrm {Substitute functions into equation for}\hspace {3pt} y_{p}\left (t \right ) \\ {} & {} & y_{p}\left (t \right )=-\left (\int f \left (t \right ) t d t \right )+t \left (\int f \left (t \right )d t \right ) \\ {} & \circ & \textrm {Compute integrals}\hspace {3pt} \\ {} & {} & y_{p}\left (t \right )=-\left (\int f \left (t \right ) t d t \right )+t \left (\int f \left (t \right )d t \right ) \\ \bullet & {} & \textrm {Substitute particular solution into general solution to ODE}\hspace {3pt} \\ {} & {} & y=c_{1} +c_{2} t -\left (\int f \left (t \right ) t d t \right )+t \left (\int f \left (t \right )d t \right ) \end {array} \]

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
<- quadrature successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 15

dsolve(diff(y(t),t$2)=f(t),y(t), singsol=all)
 

\[ y \left (t \right ) = \int \int f \left (t \right )d t d t +c_{1} t +c_{2} \]

Solution by Mathematica

Time used: 0.01 (sec). Leaf size: 30

DSolve[y''[t]==f[t],y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to \int _1^t\int _1^{K[2]}f(K[1])dK[1]dK[2]+c_2 t+c_1 \]