An equation, help please

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
Emilio
Experienced poster
Posts: 163
Joined: Sun Oct 17, 2004 8:31 pm
Location: Murcia, Spain

An equation, help please

Post by Emilio » Sat Apr 22, 2006 12:06 am

Hello there!

I'm a bit (or a little more) weak in maths. Thus, I wonder if anyone can help me to put the next equation in a pretty form. I would like delete the sumation term K3. But other ideas will be appreciated (as for example tangent forms).

Code: Select all

(sin(x)*K1*K2)/(-cos(x)*K1+K3)
where x is a variable, and K1,K2,K3 are constants.

Thanks in advance for your help!

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Sat Apr 22, 2006 4:14 am

There's a so-called trigonometric substitution: if you let t=tan(x/2), then you have:
cos x=(1-t^2)/(1+t^2), sin x=(2t)/(1+t^2), x = 2 arctan t.

You can use it with your equation and get:
(K1 K2 sin x)/(-K1 cos x + K3) = (2 K1 K2 t)/(t^2 (K3+K1) + (K3-K1))

The latter equation doesn't have any trig functions in it, so you can use it for your purposes (e.g. solving for t), and then go back to x by substituting x = 2 arctan t.

Emilio
Experienced poster
Posts: 163
Joined: Sun Oct 17, 2004 8:31 pm
Location: Murcia, Spain

Post by Emilio » Sat Apr 22, 2006 2:26 pm

Thanks mf!

I knew that a great solver would help me in this task.
Now I can continue working, and I must learn a lot of math if I want to be a great solver.

Post Reply

Return to “Algorithms”