3
$\begingroup$

I'm out of practice with algebra, and I'm having a mind blank on how to solve for $t$ in the following equation. It's for some collision detection if you're wondering. $$\Bigl( \bigl(a-y-(qt)\bigr) \bigl(b-x-(rt)\bigr) \Bigr) - \Bigl( \bigl(c-x-(rt)\bigr) \bigl(d-y-(qt)\bigr) \Bigr) = z$$

I'm really not seeing it at the moment. Thanks for any help.

  • 0
    Thanks for the edit. Is there a guide somewhere? I couldn't find one.2010-11-18
  • 0
    http://meta.math.stackexchange.com/questions/107/what-should-go-in-the-math-stackexchange-faq/117#117 Learning some basics of LateX allows you to write nicely formatted equations and such.2010-11-18

2 Answers 2

6

You could denote the differences $(a-y)$, $(b-x)$, $(c-x)$, $(d-y)$ as a single symbol to simplify computation. That is, $(a-y)=A$, $(b-x)=B$, $(c-x)=C$, $(d-y)=D$. Then you have

$$(A-qt)(B-rt)-(C-rt)(D-qt)=z$$

So

$$(AB-qBt-rAt+qrt^2)-(CD-rDt-qCt+qrt^2)=z$$

Notice that the $qrt^2$ terms cancel upon distributing the negative, and then you have a linear equation for $t$, so $t$ will be easy to isolate, and then you can resubstitute the values for $A$, $B$, $C$, and $D$. I hope my algebra has been correct.

  • 0
    Wow, I'm not really sure what I was thinking. Thanks a lot!2010-11-18
  • 0
    No problem, and welcome to math.se.2010-11-18
0

There is another way to solve it. On the left hand side of equation, there's a useful symmetry.

Separately, there are two things $(a-y-qt)(b-x-rt)$ and $(d-y-qt)(c-x-rt)$. Notice that, you can get the second one by changing the first one: $a$ into $d$, $b$ into $c$.

Let's do it in straight form

$$ab - ax - a(rt) - by + xy + (rt)y - b(qt) + x(qt) + (qt)(rt)$$

$$dc - dx - d(rt) - cy + xy + (rt)y - c(qt) + x(qt) + (qt)(rt)$$


$z=\cdots$

Just continue from here.

  • 0
    You should consider using $\LaTeX$ to render those equations well. I'll edit it as an example for you.2011-12-25
  • 0
    Thanks. well, I didn't realize this question was asked one year ago before2011-12-25