I'm stuck on this problem and hope someone can help:
The curve $C$ has equation $$ y= \frac{px^2+4x+1}{x+1}$$ where $p$ is a positive constant and $p\neq 3$. Find the values of $p$ for which the $x$-axis is tangent to $C$.
Here's what I attempted to do:
$y=\frac{px^2+4x+1}{x+1}=px+4-p+\frac{p-3}{x+1}$ and so $y'=p+\frac{3-p}{(x+1)^2}$
we want to find some $p$ such that there exists $x_0$ so that $y(x_0)=y'(x_0)=0$
well, $y=0$ when $px^2+4x+1=0$ and $y'=0$ when $px^2+2px+3=0$ using the quadritic formula for both of these equations and simplifiying a bit gets that the for the $p$ we're looking for $$-1\pm \frac{\sqrt{p-3}}{\sqrt{p}}=\frac{-2\pm \sqrt{4-p}}{p},$$ which I can see that $p=4$ solves this, but I imagine it'd be pretty difficult to solve that using algebra. So my guess is that there's a much easier way to solve this, but I am unable to see it, can someone give me some help.
Having this curve be tangent to the x-axis corresponds to having a double root, and as the equation is a quadratic / linear, this simply corresponds to the quadratic on top having a double root (the condition $p\neq3$ guarantees that the linear function won't reduce the degree of the zero at all).
We quickly check that the discriminant of the numerator is $\Delta=b^2-4ac=16-4p$, which is $0$ when $p=4$, and we are done. Note that the curve in question then has equation $y=\frac{(2x+1)^2}{x+1}$.