an=3an-1+(n2+n-2)3n
"a_n=3a_{n-1}+\\left( n^2+n-2 \\right) 3^n\\\\Homogeneous\\,\\,equation:\\\\a_n=3a_{n-1}\\Rightarrow a_n=C\\cdot 3^n\\\\Let\\,\\,a_n=C\\left( n \\right) \\cdot 3^n\\\\C\\left( n \\right) \\cdot 3^n=3\\cdot C\\left( n-1 \\right) \\cdot 3^{n-1}+\\left( n^2+n-2 \\right) 3^n\\\\C\\left( n \\right) =C\\left( n-1 \\right) +n^2+n-2=\\\\=C\\left( n-2 \\right) +\\left( n-1 \\right) ^2+\\left( n-1 \\right) -2+n^2+n-2=...=\\\\=C\\left( 0 \\right) +1^2+2^2+...+n^2+1+2+...+n-2-2-...-2=\\\\=C\\left( 0 \\right) +\\frac{n\\left( n+1 \\right) \\left( 2n+1 \\right)}{6}+\\frac{n\\left( n+1 \\right)}{2}-2n=\\\\=C\\left( 0 \\right) +\\frac{n^3+3n^2-4n}{3}\\\\a_n=\\left( C\\left( 0 \\right) +\\frac{n^3+3n^2-4n}{3} \\right) \\cdot 3^n=\\left( n^3+3n^2-4n+C \\right) \\cdot 3^{n-1}"
Comments
Leave a comment