Recursive Solutions

Recursion finds solutions to a recursion or a system of recursions. For example, to solve the recursion y(n + 2) + 3y(n + 1) + 2y(n) = 0, choose Recursion from the Solve submenu.


$\blacktriangleright$ Solve + Recursion

y$\left(\vphantom{ n+2}\right.$n + 2$\left.\vphantom{ n+2}\right)$ +3y$\left(\vphantom{ n+1}\right.$n + 1$\left.\vphantom{ n+1}\right)$ +2y$\left(\vphantom{ n}\right.$n$\left.\vphantom{ n}\right)$ = 0,

Solution is : $\left\{\vphantom{ y\left( n\right) =\left( 2y\left( 0\right) +y\left(
1\right)...
...eft( -y\left( 0\right) -y\left(
1\right) \right) \left( -2\right) ^{n}}\right.$y$\left(\vphantom{ n}\right.$n$\left.\vphantom{ n}\right)$ = $\left(\vphantom{ 2y\left( 0\right) +y\left(
1\right) }\right.$2y$\left(\vphantom{ 0}\right.$ 0$\left.\vphantom{ 0}\right)$ + y$\left(\vphantom{
1}\right.$1$\left.\vphantom{
1}\right)$$\left.\vphantom{ 2y\left( 0\right) +y\left(
1\right) }\right)$$\left(\vphantom{ -1}\right.$ -1$\left.\vphantom{ -1}\right)^{{n}}_{}$ + $\left(\vphantom{ -y\left( 0\right) -y\left(
1\right) }\right.$ - y$\left(\vphantom{ 0}\right.$ 0$\left.\vphantom{ 0}\right)$ - y$\left(\vphantom{
1}\right.$1$\left.\vphantom{
1}\right)$$\left.\vphantom{ -y\left( 0\right) -y\left(
1\right) }\right)$$\left(\vphantom{ -2}\right.$ -2$\left.\vphantom{ -2}\right)^{{n}}_{}$$\left.\vphantom{ y\left( n\right) =\left( 2y\left( 0\right) +y\left(
1\right) ...
...ft( -y\left( 0\right) -y\left(
1\right) \right) \left( -2\right) ^{n}}\right\}$

You can also specify the initial conditions by listing a system of equations in a column matrix.


$\blacktriangleright$ Solve + Recursion

y$\left(\vphantom{ n+2}\right.$n + 2$\left.\vphantom{ n+2}\right)$ +3y$\left(\vphantom{ n+1}\right.$n + 1$\left.\vphantom{ n+1}\right)$ +2y$\left(\vphantom{ n}\right.$n$\left.\vphantom{ n}\right)$ = 0
y$\left(\vphantom{ 0}\right.$ 0$\left.\vphantom{ 0}\right)$ = - 2
y$\left(\vphantom{
1}\right.$1$\left.\vphantom{
1}\right)$ = 1
, Solution is : $\left\{\vphantom{ y\left( n\right) =-3\left( -1\right) ^{n}+\left(
-2\right) ^{n}}\right.$y$\left(\vphantom{ n}\right.$n$\left.\vphantom{ n}\right)$ = - 3$\left(\vphantom{ -1}\right.$ -1$\left.\vphantom{ -1}\right)^{{n}}_{}$ + $\left(\vphantom{ -2}\right.$ -2$\left.\vphantom{ -2}\right)^{{n}}_{}$$\left.\vphantom{ y\left( n\right) =-3\left( -1\right) ^{n}+\left(
-2\right) ^{n}}\right\}$

This closed-form solution now makes it easy to find specific terms. For example, if you define y(n) = - 3(- 1)n + (- 2)n, then y(n) can be directly evaluated.


$\blacktriangleright$ Evaluate

y$\left(\vphantom{ 20}\right.$20$\left.\vphantom{ 20}\right)$ = 1048573

Systems of recursive equations also can be solved.


$\blacktriangleright$ Solve + Recursion

y(n + 1) + z(n) = n + 2n+1
z(n + 1) - y(n) = n + 3 - 2n
y(1) = 1
z(1) = 2
, Solution is : $\left\{\vphantom{ y\left( n\right) =-1+2^{n},z\left( n\right)
=n+1}\right.$y$\left(\vphantom{ n}\right.$n$\left.\vphantom{ n}\right)$ = - 1 + 2n, z$\left(\vphantom{ n}\right.$n$\left.\vphantom{ n}\right)$ = n + 1$\left.\vphantom{ y\left( n\right) =-1+2^{n},z\left( n\right)
=n+1}\right\}$

In particular, z(10) = 11 and y(10) = 1023.