Solve the IVP:

$$y^2_{k+2}-4y^2_{k+1}+m\cdot y^2_k=k, m \in \mathbb{R},$$ $y_0=1, y_1=2, y_2=\sqrt{13}$

I started by taking $k=0$

$y^2_2-4y^2_1+my^2_0=k$ $\Rightarrow13-16+m=k$ $\Rightarrow m=k+3$

But I don't know how to proceed any help?

  • $\begingroup$ Set $x_k=y_k^2.$ Then it becomes a second-order linear inhomogeneous difference equation with constant coefficients. Look here $\endgroup$ – saulspatz Feb 3 at 12:34
  • 1
    $\begingroup$ In your equation for $k=0$, you need to set $k=0$ on both sides. Then $m=3$ for the given initial values, and per the theory of linear recursion, the basis solutions are $1$ and $3^k$, so that by undetermined coefficients the general solution has the form $y^2_k=A+B3^k+(Ck+Dk^2)$ with $A,B,C,D$ completely determined by equation and initial values. $\endgroup$ – Dr. Lutz Lehmann Feb 3 at 17:59
  • $\begingroup$ Hahaha what a silly mistake! Thanks $\endgroup$ – VakiPitsi Feb 3 at 19:47
  • $\begingroup$ Are you sure that $k$ in the RHS is also the subscript $k$ used in the LHS of the recursion? $\endgroup$ – Did Feb 5 at 8:08

I realized that the source I cited in my comment doesn't have an example quite like this one, so I'll sketch the procedure, leaving the details for you.

First, as I said, set $x_k=y_k^2$ giving $$x_{k+2}-4x_{k+1}+mx_k=k\tag{1}$$ with initial data $$\begin{align} x_0&=1\\ x_1&=4\\ x_2&=13\end{align}$$ The general solution of $(1)$ is the general solution of the associated homogeneous equation $$x_{k+2}-4x_{k+1}+mx_k=0\tag{2}$$ plus any particular solution of $(1).$

The general solution of $(2)$ is $$x_k=c_1r_1^k+c_2r_2^k$$ where $r_1$ and $r_2$ are the roots of the characteristic polynomial $$x^2-4x+m$$ If there is a double root, which will happen if $m=4,$ then the general solution is a bit different. When $m=4,\ 2$ is a double root of the characteristic polynomial, and the general solution of $(2)$ becomes $$x_k=c_12^k+c_2k2^k$$

Now we have to guess a particular solution to $(1)$. Since the right-hand side is a linear polynomial in $k$ we guess that a solution in the form of a linear polynomial exists $$x_k=ak+b$$ and we substitute this guess into $(1)$ to solve for $a$ and $b$. When I did did, I found that it worked except in the case $m=3.$ If $m=3$ you should guess that there is a quadratic solution. I didn't actually do this, but it should work.

Now you have three cases, $m=3,$ $m=4,$ and $m\neq 3,4,$ and in each case you have a slightly different formula for the general solution of $(1).$ In each case, you can substitute the initial data to find the undetermined coefficients.


As LutzL has pointed out, setting $k=0$ and substituting the initial values in $(1)$ gives $m=3,$ so there is really only one case to consider.

  • $\begingroup$ Thank you for your answer! Very helpfull $\endgroup$ – VakiPitsi Feb 3 at 13:31
  • $\begingroup$ When $m>4$, the roots of the characteristic polynomial are complex and the solution of the homogeneous equation takes a different form. More precisely, if $r = \rho e^{i \theta}$ is one of the roots, you get $x_k = \rho^k (c_1 \cos (\theta k) + c_2 \sin (\theta k))$. Although this can be recovered from the mentioned formula for $k<4$, it is more direct to have this expression. $\endgroup$ – PierreCarre Feb 3 at 14:10
  • 2
    $\begingroup$ With the given 3 initial values for an order-2 recursion equation, the value of $m$ is fixed as $m=3$. $\endgroup$ – Dr. Lutz Lehmann Feb 3 at 17:07
  • $\begingroup$ @LutzL Good point. I didn't even think about that, though I admit I wondered why they gave three initial values. I feel so stupid. $\endgroup$ – saulspatz Feb 3 at 17:14

Substituting $w_k = y_k^2$ you get the linear difference equation $$ w_{k+2}-4 w_{k+1}+m w_k = m. $$

The general solution of this linear equation can be written as $w_K = x_k + x_k^*$, where $x_k$ is the general solution of the homogeneous equation (set rhs to zero) and $x_k^*$ is a particular solution of the difference equation.

The characteristic polynomial is $p(\lambda) = \lambda^2-4 \lambda + m$, whose roots are $2 \pm \sqrt{4-m}$, and so depending on whether $m<4$, $m>4$ or $m=4$ you have the expression for $x_k$.

The particular solution $x_k^*$ can be obtained assuming that it is similar to the rhs and plugging into the equation. The choice of particular solution may also depend on $m$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.