Second-Order Homogeneous and Particular Solutions to ODE Examples, Hyperbolic Trig Particular Solution

Home»Math Guides»Second Order Homogeneous and Particular Solutions to ODES 3

How to find the homogeneous and particular solutions for a second-order ordinary ODE, but with a hyperbolic trig particular solution that has a “repeated term”

You’ve learned how to solve a second-order ODE that has both a homogeneous and particular solution, and we’ve also shown an example of when the particular solution is contained within the homogeneous solution.

Have you considered that a hyperbolic trig function could be contained in the homogeneous solution? It’s more likely than you think, the homogeneous solution is often made up of e terms that could actually resemble hyperbolic trig functions!

Refresh yourself on the definition of hyperbolic trigonometry functions:

\[\sinh \left( x \right) = \frac{{{e^x} – {e^{ – x}}}}{2}\]

\[cosh\left( x \right) = \frac{{{e^x} + {e^{ – x}}}}{2}\]

Let’s solve an example problem where the hyperbolic trigonometry function is actually contained within the homogeneous solution.

Example problem: \(y” – y = \cosh \left( x \right)\), with the initial conditions \(y(0) = 2\) and \(y'(0) = 12\).

First solve the homogeneous solution, let \(y = {e^{mx}}\), find its derivatives and substitute into the left-hand side of the equation to get the polynomial:

\[{m^2} – 1 = 0\]

\[(m + 1)(m – 1) = 0\]

The roots are distinct real roots, m = 1 and m = -1

The homogeneous solution is:

\[{y_h} = {c_1}{e^{ – x}} + {c_2}{e^x}\]

See, the hyperbolic trigonometric functions could resemble this! So when you assume the particular solution form, multiply by x. If you don’t multiply by x, you can’t solve for A or B.

Assume a particular solution of the form \({y_p} = Ax\sinh \left( x \right) + Bx\cosh \left( x \right)\)

Now find the derivatives and simplify. Careful, the derivative of cosh(x) is +sinh(x) unlike the regular cosine derivative.

\[y’ = (A + Bx)\sinh \left( x \right) + (A + Bx)\cosh \left( x \right)\]

\[y” = (Ax + 2B)\sinh \left( x \right) + (2A + Bx)\cosh \left( x \right)\]

Plug these into the original ODE we need to solve.

\[\sinh \left( x \right)\left( {Ax + 2B – Ax} \right) + \cosh (x)\left( {2A + Bx – Bx} \right) = \cosh (x)\]

Now, the trick to solving these easily is to just equate the powers or common terms.

First equate everything factored by sinh(x), 2B = 0, B = 0

And equate everything factored by cosh(x), 2A = 1, A = 1/2

The complete solution is the summation of the homogeneous solution and the particular solution, \(y = {y_h} + {y_p}\).

\[y = {c_1}{e^{ – x}} + {c_2}{e^x} + \frac{{x\sinh \left( x \right)}}{2}\]

Now we use the initial conditions. y(0) = 2.

2 = \({c_1}\)+\({c_2}\)

And we need to use y’, put the A and B values we found into the y’ equation we found previously.

\[y’ = – {c_1}{e^{ – x}} + {c_2}{e^x} + \frac{{\sinh \left( x \right) + x\cosh \left( x \right)}}{2}\]

Using y'(0) = 12, then

12 = -\({c_1}\)+\({c_2}\)

We have two equations and two unknowns, we put these into a matrix and solve in a calculator, see Equasor’s YouTube video on how to quickly enter and solve a matrix on a Casio fx 115 ESPLUS calculator.

\[\left( {\begin{array}{*{20}{c}}1&1\\{ – 1}&1\end{array}} \right)\left( {\begin{array}{*{20}{c}}{{c_1}}\\{{c_2}}\end{array}} \right) = \left( {\begin{array}{*{20}{c}}2\\{12}\end{array}} \right)\]

Invert the matrix.

\[\left( {\begin{array}{*{20}{c}}{\frac{1}{2}}&{ – \frac{1}{2}}\\{\frac{1}{2}}&{\frac{1}{2}}\end{array}} \right)\left( {\begin{array}{*{20}{c}}2\\{12}\end{array}} \right) = \left( {\begin{array}{*{20}{c}}{{c_1}}\\{{c_2}}\end{array}} \right)\]

So \({c_1}\)=(1/2)(2)+(-1/2)(12) = -5, and repeat to find \({c_2}\)=7

Fill in the constants and we find the solution to be:

\[y = – 5{e^{ – x}} + 7{e^x} + \frac{{x\sinh \left( x \right)}}{2}\]

How to solve a second-order ordinary differential equation using MATLAB and double checking your answer

If you have the program MATLAB, you can easily use its symbolic tools to get the exact solution to the problem, feel free to use our following script and modify it for the problem you’re trying to solve.

It’s extremely handy for double-checking your answers before handing them in for an assignment. You can even make your own problems and solve them if you want extra practice solving second-order ODEs.

%bai-gaming.com/math-guides
syms y(x) x
eqn = diff(y,x,2) - y == cosh(x);
S = dsolve(eqn)

Try the final case, solving a particular solution in the form of a polynomial! 

Next, try using the Laplace Transform to solve second-order ODES!

Click here to return to the Math Guides hubpage

Leave a Comment