# Thread: [SOLVED] Help sovling a simple equation

1. ## [SOLVED] Help sovling a simple equation

sin(theta)(V2) - (V1)(d1) = (d2)cos(theta)

I need to solve this for theta.

I wasn't sure where to put this, so I put it here as it seems most general.

This isn't for a class (it's for some code I'm working on), so I don't really know what section you'd want this under. Algebra 1, maybe?

I feel sort of dumb for not being able to get this, as it LOOKS very simple, but I've tried every trig identity I know and I simply cannot simplify for theta.

Any help would be much appreciated.

2. Originally Posted by brenoink
sin(theta)(V2) - (V1)(d1) = (d2)cos(theta)

I need to solve this for theta.

I wasn't sure where to put this, so I put it here as it seems most general.

This isn't for a class (it's for some code I'm working on), so I don't really know what section you'd want this under. Algebra 1, maybe?

I feel sort of dumb for not being able to get this, as it LOOKS very simple, but I've tried every trig identity I know and I simply cannot simplify for theta.

Any help would be much appreciated.
It's not as easy as it looks, so don't feel so bad. Here's how I would attack this:
$\displaystyle V_2~sin(\theta) - V_1d_1 = d_2~cos(\theta)$

Square both sides:
$\displaystyle V_2^2~sin^2(\theta) - 2V_1V_2d_1~sin(\theta) + V_1^2d_1^2 = d_2^2~cos^2(\theta)$

Now $\displaystyle cos^2(\theta) = 1 - sin^2(\theta)$, so
$\displaystyle V_2^2~sin^2(\theta) - 2V_1V_2d_1~sin(\theta) + V_1^2d_1^2 = d_2^2~(1 - sin^2(\theta))$

Now to clean some stuff up.
$\displaystyle (d_2^2 + V_2^2)~sin^2(\theta) - 2V_1V_2d_1~sin(\theta) + (V_1^2d_1^2 - d_2^2) = 0$

This is a quadratic in $\displaystyle sin(\theta)$. If you have a hard time seeing that (or dealing with it) let $\displaystyle y = sin(\theta)$:
$\displaystyle (d_2^2 + V_2^2)y^2 - 2V_1V_2d_1y + (V_1^2d_1^2 - d_2^2) = 0$

So I get
$\displaystyle y = \frac{-(-2V_1V_2d_1) \pm \sqrt{(-2V_1V_2d_1)^2 - 4(d_2^2 + V_2^2)(V_1^2d_1^2 - d_2^2)}}{2(d_2^2 + V_2^2)}$

Now, if this isn't enough to have to clean up, you also have to make sure that you only take a solution that has a magnitude of one or less (because $\displaystyle -1 \leq sin(\theta) \leq 1$.) If you have numbers, now would be a good time to plug them in.

I did a bit of work on this and got:
$\displaystyle sin(\theta) = \frac{V_1V_2d_1 \pm d_2\sqrt{V_2^2 - V_1^2d_1^2 + d_2^2 }}{2(d_2^2 + V_2^2)}$
I'd advise checking it to make sure I didn't make a mistake.

(I feel this equation is relatively familiar. Where did it come from?)

-Dan

3. ## Trig

First, you rearrange $\displaystyle V_2\sin\theta-V_1d_1=d_2\cos\theta$ into
$\displaystyle V_2\sin\theta-d_2\cos\theta=V_1d_1$ via simple algebra.
Now, let $\displaystyle R=\sqrt{V_2^2+d_2^2}$, and let $\displaystyle \phi$ be an angle such that $\displaystyle tan\phi=\frac{d_2}{V_2}$ and such that $\displaystyle \sin\phi$ has the same sign as $\displaystyle d_2$. Then, we see that $\displaystyle V_2=R\cos\phi$ and $\displaystyle d_2=R\sin\phi$. Thus our equation becomes
$\displaystyle R\sin\theta\cos\phi-R\cos\theta\sin\phi=V_1d_1$
$\displaystyle \sin(\theta-\phi)=\frac{V_1d_1}{R}$
$\displaystyle \theta=\phi+\arcsin\frac{V_1d_1}{\sqrt{V_2^2+d_2^2 }}$

Note that if both $\displaystyle V_2$ and $\displaystyle d_2$ are non-negative, then $\displaystyle 0\le\phi\le\frac{\pi}{2}$, and $\displaystyle \phi=\arctan\left(\frac{d_2}{V_2}\right)$ with the usual range on the inverse tangent.

-Kevin C.

4. Originally Posted by TwistedOne151
First, you rearrange $\displaystyle V_2\sin\theta-V_1d_1=d_2\cos\theta$ into
$\displaystyle V_2\sin\theta-d_2\cos\theta=V_1d_1$ via simple algebra.
Now, let $\displaystyle R=\sqrt{V_2^2+d_2^2}$, and let $\displaystyle \phi$ be an angle such that $\displaystyle tan\phi=\frac{d_2}{V_2}$ and such that $\displaystyle \sin\phi$ has the same sign as $\displaystyle d_2$. Then, we see that $\displaystyle V_2=R\cos\phi$ and $\displaystyle d_2=R\sin\phi$. Thus our equation becomes
$\displaystyle R\sin\theta\cos\phi-R\cos\theta\sin\phi=V_1d_1$
$\displaystyle \sin(\theta-\phi)=\frac{V_1d_1}{R}$
$\displaystyle \theta=\phi+\arcsin\frac{V_1d_1}{\sqrt{V_2^2+d_2^2 }}$

Note that if both $\displaystyle V_2$ and $\displaystyle d_2$ are non-negative, then $\displaystyle 0\le\phi\le\frac{\pi}{2}$, and $\displaystyle \phi=\arctan\left(\frac{d_2}{V_2}\right)$ with the usual range on the inverse tangent.

-Kevin C.
Hmmmm...

That's the second method tonight that I had totally forgotten about. Well, it's a good refresher anyway!

-Dan