Fwd: Trigonometric equations



  On 9/2/2010 10:50 AM, Stavros Macrakis wrote:
> Jean Pellegri suggested another, simpler, approach, namely to solve 
> for tan(x):
>
> (%i2) load(to_poly_solver)$
> ...
> (%i3) eq: 2*cos(x)^2*x0-2*sin(x)*cos(x)*y0=x0;
> (%o3) 2*cos(x)^2*x0-2*cos(x)*sin(x)*y0 = x0
> (%i4) subst(atan(q),x,%);
>
...
this reminds me of another trick.


Let u = tan(x/2).  then sin(x) = 2*u/(1+u^2), cos(x)= (1-u^2)/(1+u^2),
and the equation reduces to



(x0*u^4+4*y0*u^3-6*x0*u^2-4*y0*u+x0)/(u^4+2*u^2+1)=0

This half-angle substitution is often used in integration to replace
simultaneously sin and cos.

The denominator obviously factors, and if we look at the numerator and
separate 2 cases:  x0=0, and not x0=0, we can simplify more.

if x0=0,
(4*(u-1)*u*(u+1)*y0)/(u^2+1)^2 = 0  so solutions include u=1, u=0, u=-1, 
and something bad at u=+-i.


if x0 is not zero, we can make a substitution, say m = y0/x0, and 
slightly simplify the formula,
but it is still a quartic in u, and solve shows us the mess.