Math Help - [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:
$V_2~sin(\theta) - V_1d_1 = d_2~cos(\theta)$

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

Now $cos^2(\theta) = 1 - sin^2(\theta)$, so
$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.
$(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 $sin(\theta)$. If you have a hard time seeing that (or dealing with it) let $y = sin(\theta)$:
$(d_2^2 + V_2^2)y^2 - 2V_1V_2d_1y + (V_1^2d_1^2 - d_2^2) = 0$

So I get
$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 $-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:
$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 $V_2\sin\theta-V_1d_1=d_2\cos\theta$ into
$V_2\sin\theta-d_2\cos\theta=V_1d_1$ via simple algebra.
Now, let $R=\sqrt{V_2^2+d_2^2}$, and let $\phi$ be an angle such that $tan\phi=\frac{d_2}{V_2}$ and such that $\sin\phi$ has the same sign as $d_2$. Then, we see that $V_2=R\cos\phi$ and $d_2=R\sin\phi$. Thus our equation becomes
$R\sin\theta\cos\phi-R\cos\theta\sin\phi=V_1d_1$
$\sin(\theta-\phi)=\frac{V_1d_1}{R}$
$\theta=\phi+\arcsin\frac{V_1d_1}{\sqrt{V_2^2+d_2^2 }}$

Note that if both $V_2$ and $d_2$ are non-negative, then $0\le\phi\le\frac{\pi}{2}$, and $\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 $V_2\sin\theta-V_1d_1=d_2\cos\theta$ into
$V_2\sin\theta-d_2\cos\theta=V_1d_1$ via simple algebra.
Now, let $R=\sqrt{V_2^2+d_2^2}$, and let $\phi$ be an angle such that $tan\phi=\frac{d_2}{V_2}$ and such that $\sin\phi$ has the same sign as $d_2$. Then, we see that $V_2=R\cos\phi$ and $d_2=R\sin\phi$. Thus our equation becomes
$R\sin\theta\cos\phi-R\cos\theta\sin\phi=V_1d_1$
$\sin(\theta-\phi)=\frac{V_1d_1}{R}$
$\theta=\phi+\arcsin\frac{V_1d_1}{\sqrt{V_2^2+d_2^2 }}$

Note that if both $V_2$ and $d_2$ are non-negative, then $0\le\phi\le\frac{\pi}{2}$, and $\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