Question: Suppose that there is a biased coin and we flip the coin until 2 of the most recent 3 flips are heads. Let $p$ be the probability that it is heads. Also, let $X$ be the random variable which represents the total flips. If the first 2 flips are heads, then $X=2$. How can we find the expected value of $X$?

Answer: 
You can simply use that $x^3$ and $x^2$ are both strictly increasing for positive $x$. (What does this tell you about $f(x)$?)
Suppose for contradiction that $f(x)= x^3+\frac 32 x^2+\lambda$ has distinct roots in $[0,1]$.

Then there exist $a,b \in $[0,1]$ so that $f(a)=f(b)=0$.

Then by Rolle's theorem, $f$ achieves a maximum on the interval $(a,b)$. Let $x$ be the max in $[a,b]$

But $f^{\prime}(x)=3x^2+3x$.

So $0=3x(x+1)$.

Since $x=0,-1$ are the solutions...