# Solving $a \sin(\alpha) - c \sin^2(\alpha) = b \cos(\alpha) - c \cos^2(\alpha)$

$a, b, c$ are given positive integers. I need $\sin(\alpha)$ or $\cos$ or anything simple with $\alpha$ from the equation:

$$a \sin(\alpha) - c \sin^2(\alpha) = b \cos(\alpha) - c \cos^2(\alpha)$$

-

With this much information, you can use $$\cos\alpha=\frac{1-\tan^2\frac\alpha2}{1+\tan^2\frac\alpha2}\text{ and } \sin\alpha=\frac{2\tan\frac\alpha2}{1+\tan^2\frac\alpha2}$$ which will give you a Quartic Equation in $\tan\frac\alpha2$

Once you have solved for $\tan\frac\alpha2,$ you can easily get $\cos\alpha,\sin\alpha$ using the above formulae.

Alternatively, we can also do the following:

$$b\cos\alpha=c\cos^2\alpha-c\sin^2\alpha+a\sin\alpha=c(1-\sin^2\alpha)-c\sin^2\alpha+a\sin\alpha$$

$$b\cos\alpha=c+a\sin\alpha-2c \sin^2\alpha$$

Squaring we get $$b^2(1-\sin^2\alpha)=(c+a\sin\alpha-2c\sin^2\alpha)^2$$

On simplification we shall get a Quartic Equation in $s=\sin\alpha$

But unfortunately, the squaring has introduced extraneous roots which need exclusion.

-
The Quartic Equation I think is not as simple as it looks like and I will appreciate it if you help me solve it or give me some easier solution :S please :) – Ivan Mar 29 '13 at 11:18
@Ivan, I said, from $\tan\frac\alpha2,$ you can easily get $\cos\alpha,\sin\alpha$. But admittedly solving a Quartic Equation is so easy. Again, with this much of information I really don't have any better solution. – lab bhattacharjee Mar 29 '13 at 11:27
Doesn't it that both equations include s^3 and then I have no idea of solving them. Extraneous roots are easy to exclude (because in my problem I have many other conditions :)) Well the whole problem is I have a rectangle a x b and I need to find the max possible length of the side of another rectangle that is inside the first (the inner rectangle's one side is c). And .. I ended with the first equation I gave. – Ivan Mar 29 '13 at 11:28
@Ivan, the link in the answer and planetmath.org/ferraricardanoderivationofthequarticformula shows you how to solve a Quartic Equation – lab bhattacharjee Mar 29 '13 at 11:31

In general, lab bhattacharjee's method will work. However, if $a^2+b^2=c^2$, there is a simpler solution.

If $a^2+b^2=c^2$, and $\tan(\theta)=b/a$, then this simplifies to \begin{align} 0 &=a\sin(\alpha)-b\cos(\alpha)+c\cos^2(\alpha)-c\sin^2(\alpha)\\ &=c\sin(\alpha-\theta)+c\cos(2\alpha)\\ &=c\cos(\pi/2-\alpha+\theta)+c\cos(2\alpha)\\ &=2c\sin\left(\pi/4-\theta/2-\alpha/2\right)\sin\left(\pi/4-\theta/2+3\alpha/2\right)\tag{1} \end{align} where we've used $\cos(A)+\cos(B)=2\cos\left(\frac{A+B}{2}\right)\cos\left(\frac{A-B}{2}\right)$.

$(1)$ means either $$\pi/4-\theta/2-\alpha/2\equiv0\pmod{\pi}\tag{2a}$$ or $$\pi/4-\theta/2+3\alpha/2\equiv0\pmod{\pi}\tag{2b}$$

-
Can I conlude here that when tan(θ)=b/a then θ = π/2 - α? This is when sin(α) = a/c. – Ivan Mar 29 '13 at 11:14
No. Under the conditions given, $\sin(\theta)=b/c$ and $\cos(\theta)=a/c$. – robjohn Mar 29 '13 at 11:23