Compute $1^2 + 3^2+ 5^2 + \cdots + (2n-1)^2$ by mathematical induction I am doing mathematical induction. I am stuck with the question below. The left hand side is not getting equal to the right hand side.
Please guide me how to do it further.

$1^2 + 3^2+ 5^2 + \cdots + (2n-1)^2 = \frac{1}{3}n(2n-1)(2n+1)$.

Sol:
$P(n):\ 1^2 + 3^2 + 5^2 + \cdots + (2n-1)^2 = \frac{1}{3}n(2n-1)(2n+1)$.
For $n=n_1 = 1$
$$P(1) = \frac{1}{3}{3} = (1)^2.$$
Hence it is true for $n=n_0 = 1$.
Let it be true for $n=k$
$$P(k): 1^2 + 3^2 + 5^2 + \cdots + (2k-1)^2 = \frac{1}{3}k(2k-1)(2k+1).$$
We have to prove that it is true for $P(k+1)$.
$$P(k+1) = 1^1+3^2+5^2+\cdots+(2k+1)^2 = \frac{1}{3}(k+1)(2k+1)(2k+3)\tag{A}.$$  
Taking LHS:
$$\begin{align*}
1^2 + 3^2 + 5^2 + \cdots + (2k+1)^2 &= 1^2+3^2+5^2+\cdots + (2k+1)^2\\
&= 1^2 + 3^2 + 5^2 + \cdots + (2k-1)^2 + (2k+1)^2\\
&= \frac{1}{3}k(2k-1)(2k+1) + (2k+1)^2\\
&=\frac{k(2k-1)(2k+1)+3(2k+1)^2}{3}\\
&=\frac{(2k+1)}{3}\left[k(2k-1) + 3(2k+1)\right]\\
&=\frac{(2k+1)}{3}\left[2k^2 - k + 6k + 3\right]\\
&=\frac{1}{3}(2k+1)(2k^2 +5k + 3)\\
&=\frac{1}{3}(2k+1)(k+1)\left(k+\frac{3}{2}\right) \tag{B}
\end{align*}$$ 
EDIT:
Solving EQ (A):
$=(1/3)(2k^2+5K+3) (2K+1) \tag{C}$
Comparing EQ(B) and EQ(C)
Hence proved that it is true for $n = k+1.$
Thus the proposition is true for all $n >= 1$.
Thanks.

Everything is OK except for the very last line. You somehow lost a factor of two. The penultimate line is already the result you want, since $2k^2+5k+3=(k+1)(2k+3)$.
