I'm trying to derive a polar, general and graphing, form of a quadratic equation. Here Is what I've done so far.
$$ f(x)=ax^2+bx+c $$ And $$ f(x)=a(x-h)^2+k $$ Then I substituted $$ x=r\cos(\theta) $$ and $$ y=r\sin(\theta) $$ Here's the work: $$r\sin(\theta)=a(r\cos(\theta)^2+b(r\cos(\theta)+c $$ $$ r\sin(\theta)=ar^2\cos^2(\theta)+br\cos(\theta)+c $$ $$ \sin(\theta)=\arccos^2(\theta)+b\cos(\theta)+\frac{c}{r} $$ $$\frac{\sin(\theta)-b\cos(\theta)-c}{\arccos^2(\theta)}=r $$ $$ r(\theta)=\frac{1}{a}\tan(\theta)\sec(\theta)-\frac{b}{a}\sec(\theta)-\frac{c}{a}\sec^2(\theta) $$ This seems to work for any quadratic where $c=0$. But if $c$ is not equal to zero, then the graph goes from a parabola to some craziness. The same is true using the graphing form I derived through the same process $$ r(\theta)=\frac{1}{a}(\tan(\theta)+k\sec(\theta)+2h)+h^2\sec(\theta) $$
Does anyone know how to fix this so that it will properly graph quadratics where $c$ is not equal to zero?
It looks like you treated $c/r$ as $cr$ when you factored out $r$. Instead, use the quadratic formula for $r$:
$$ rsin(\theta)=ar^2cos^2(\theta)+brcos(\theta)+c $$
which becomes $$ 0=ar^2cos^2(\theta)+brcos(\theta)-rsin(\theta)+c $$
which becomes $$r=(1/2a)\sec^2(\theta)\left(\sin(\theta)-b\cos(\theta) \pm \sqrt{(\sin(\theta)-b\cos(\theta))^2-4ac \cos^2(\theta)}\right)$$
Note this reduces to your equation for $c=0$,and should also be simple for a focus at the origin.
Edit: A wolfram Alpha plot for a=b=c=1: http://www.wolframalpha.com/input/?i=r%3d(1%2f2)%5csec%5e2(%5ctheta)(%5csin(%5ctheta)-%5ccos(%5ctheta)+%2b%5csqrt%7b(%5csin(%5ctheta)-%5ccos(%5ctheta))%5e2-4+%5ccos%5e2(%5ctheta)%7d)+polar