# Thread: Solving trig equation for its input

1. ## Solving trig equation for its input

I have following trig function:
X = COT-1 ( -(TAN(A) * SIN(B) + SIN(Y) * COS(B)) ) / COS(Y) )
A and B are known as well as X. I need to solve it for Y.

I've tried to solve it already, and I have sinking feeling that it might be unsolvable.
If it helps, A is between -90 and 90 degrees inclusive. B equals to something close to 23.45 degrees, it's the obliquity of earth's ecliptic.

Thanks.

2. ## Re: Solving trig equation for its input

You can rearrange to get:

cos(y) cot(x) = -tan(a) sin(b) -sin(y)cos(b)

Since you have values for x, a, and b, for ease of manipulation we can let cot(x) = P, -tan(a)sin(b) = Q , and -cos(b) = R, and this becomes:

P cos(y) = Q+Rsin(y)

Replace the cosine function with its equivalent sine function:

P sqrt(1-sin^2(y)) = Q + R sin(y).

Now square both sides:

P^2 (1- sin^2(y)) = Q^2 + 2QRsin(y) + R^2 sin^2(y)

Rearrange into a quadratic equation:

(P^2+R^2) sin^2(y) + 2QR sin(y) +(Q^2-P^2) = 0

Now use the quadratic formula to solve for sin(y). You'll get two answers - try them both back in the original equation to see if they both work.

3. ## Re: Solving trig equation for its input

Thanks, it worked wonderfully.
One thing I would add is that in this case, there seems to be 4 answers that need to be checked. After deriving two answers from quadratic formula and doing ARCSIN, it's important to also check for 180˚- ARCSIN(...) version. The sqrt(1-sin^2(y)) part was quite clever, I missed it.