# $x^2+y^2=1$, find min/max of $(3x+2y)^2+(x+2y)^2$

I have been trying to solve this problem,

For $x, y \in \mathbb{R}$ such that $x^2+y^2=1$, find the minimum and maximum value of $$(3x+2y)^2+(x+2y)^2$$

There are many ways to solve this problem such as

• Trigonometry (substitute $x = \sin\theta, y = \cos\theta, \theta\in\left[0, 2\pi\right)$)

• Lagrange Multipliers

• Solve for $y$ and plug it in to the wanted expression and differentiate it.

• If we let the wanted expression equal to some constant $k$, it is an ellipse thus use linear transformation to rotate and find values of $k$ such that the ellipse is circumscribed inside/outside the circle

Using trigonometry, I found out that the answer is min: $9-\sqrt{65}$, max: $9+\sqrt{65}$.

But this problem actually came up in an algebra textbook (no relation to calculus or even pre-calculus), with the topic of Quadratic Equations and Discriminants.

Considering the context of the textbook, I am trying to find a solution using discriminants. My first try was to let the given expression $(3x+2y)^2+(x+2y)^2 = k$ and assume that the min/max will happen when the discriminant is greater than or equal to $0$. (Since the equation must have real roots).

So what I did was expand to get $10x^2+16xy+8y^2=k$, use $x^2+y^2=1$ to simplify into $$2x^2+16xy+8-k=0$$ this equation of $x$ must have real roots so $D/4\geq0$. $$64y^2-2(8-k)\geq0$$

Now I am currently stuck here. Is there a way to get around this? I would really like to find a solution that uses discriminants. Thanks in advance.

Note: I just mentioned the $4$ other ways to solve this problem so that I can emphasize that I would really like to see a solution using discriminants.

Also, any solution without calculus (or with only topics covered until high school - maybe -) are always welcome.

• Nice question. +1 Thanks for the good formatting! – Adrian Keister Feb 26 '18 at 15:15

Let $$f(x,y)=(3x+2y)^2+(x+2y)^2=10x^2+16xy+8y^2.$$ If $f(x,y)=a$ for some $x$, $y$ on the unit circle then $$f(x,y)-a(x^2+y^2)=0\tag1$$ has nonzero real solutions. But if $(1)$ has a nonzero real solution, one can scale it so that $x^2+y^2=1$, and then $f(x,y)=a$ for that $(x,y)$.

But $$f(x,y)-a(x^2+y^2) =(10-a)x^2+16xy+(8-a)y^2.$$ This has a nonzero real solution iff the discriminant $$16^2-4(10-a)(8-a)\ge0.$$ Solve this inequality for $a$ to get the values of $f$ on the unit circle.

• Can I suggest a small clarifying edit: just after equation (1), change "has nonzero real solutions" to "for any fixed $(x, y)$, has a nonzero real solution for $a$." – John Hughes Feb 26 '18 at 15:30
• Wow.. I am baffled.. I never thought I could change $a$ to $a(x^2+y^2)$. Thank you very much, you just solved my problem that troubled me for a week! I can finally go to sleep now! Thanks! – zxcvber Feb 26 '18 at 15:31
• Very nice! Reminiscent of Lagrange. – Adrian Keister Feb 26 '18 at 15:37

$$y=10\sin^2t+16\sin t\cos t+8\cos^2t$$

Divide both sides by $\cos^2t$ and set $\tan t=a$

$$(1+a^2)y=10a^2+16a+8\iff a^2(10-y)+16a+8-y=0$$ which is a Quadratic Equation in $y$

So, the discriminant must be $\ge0$

$$\implies16^2\ge4(10-y)(8-y)\iff(y-9)^2\le64+1\iff-\sqrt{65}\le y-9\le\sqrt{65}$$

• I like the way you changed $\tan t = a$. – zxcvber Feb 26 '18 at 16:25

Substituting with trig functions gives, $$y=10\sin^2t + 16\sin t\cos t+8\cos^2t$$ Using the identity $\sin^2x+\cos^2x=1$, it simplifies to $$y=8 + 2\sin^2t + 16\sin t \cos t$$ Use the double-angle formula $\sin{2x}=2\sin x \cos x$ and half-angle formula $\sin^2t = \frac{1-\cos{2t}}{2}$. $$y=9+8\sin 2t-\cos 2t$$

Now, $$y = 9+\sqrt{65}\left(\frac{8}{\sqrt{65}} \sin 2t - \frac{1}{\sqrt{65}} \cos 2t\right)$$ $$y=9+\sqrt{65} \sin{(2t-\alpha)}$$ where $\cos\alpha=8/\sqrt{65}, \sin\alpha=1/\sqrt{65}$

Thus maximum is $9+\sqrt{65}$, minimum is $9-\sqrt{65}$.