# Homework Help: Equation into Matrix

1. Jul 17, 2009

### sourlemon

I have the following equations:

$$x* = C\frac{(xcos(t)+ysin(t))/cos(s)}{f-xtan(s)cos(t)-ytan(s)sin(t)}$$

$$y* = C\frac{-xsin(t)+ycos(t)}{f-xtan(s)cos(t)-ytan(s)sin(t)}$$

I want to transform it into a matrix so that the x and y are separated.

I can easily separate the numerator. But I'm having trouble separating the denominator. I tried to do it using partial fraction, but I don't know what to do with the f. I got as far as taking tan(s) out.

$$f-xtan(s)cos(t)-ytan(s)sin(t) = f-tan(s)(xcos(t)-ysin(t))$$

I don't even know where to start.

2. Jul 17, 2009

### tiny-tim

Hi sourlemon!

(I haven't actually tried this, but …)

does it help if you rotate, and put p = xcos(t) + ysin(t), q = ycos(t) - xsin(t)?

3. Jul 18, 2009

### sourlemon

thank you for your quick response tim. I don't exactly understand what you mean though. As you said, if I set the variable to p and q, I would have the following.

$$x* = C\frac{p/cos(s)}{f-tan(s)(p)}$$

$$y* = C\frac{q}{f-tan(s)(p)}$$

But how would that help me extract x and y out of the equation with the denominator being f-tan(s)p. This is the result I want. (I don't know how to write matrix in here, so I'll write it in matlab format, hopefully you'll understand.)

[x*; y*] = [matrix] [x; y]

Last edited: Jul 18, 2009
4. Jul 18, 2009

### tiny-tim

Hi sourlemon!

(again, I haven't tried it, but …)

the next step would be finding p* and q* (and maybe tidying a bit by multiplying top and bottom by cos(s))

5. Jul 18, 2009

### sourlemon

thank you again for your quick response tim. You don't have to worry about it working or not, I'm just happy you're pointing me to a direction. I hope you won't lose your patience with me as I'm slow with this. But can I ask what is p* and q*?

$$x* = \frac{Cp}{fcos(s)-tan(s)(p)cos(s)}$$

$$y* = \frac{Cq}{f-tan(s)(p)}$$

6. Jul 19, 2009

### tiny-tim

Sure! We defined p = xcos(t) + ysin(t), q = ycos(t) - xsin(t),

so p* = x*cos(t) + y*sin(t), q* = y*cos(t) - x*sin(t).

7. Jul 19, 2009

### sourlemon

Thank you tim. So now do I substitute x* and y* in terms of p* and q*?

Tim, is this a special type of substitution? Is there an example that I can see?

Last edited: Jul 19, 2009
8. Jul 19, 2009

### tiny-tim

To get p*, just multiply the equation for x* by cos(t), and the equation for y* by sin(t), and add.

And similarly to get q*.

9. Jul 19, 2009

### sourlemon

Thank you again for your patience, Tim :) Hopefully I followed your instruction correctly. This is what I got for p* and q*.

$$p* = \frac{Cpcos(t) + Cqsin(t)cos(s)}{cos(s)(f-tan(s)(p))}$$

$$q* = \frac{Cqcos(t)cos(s) - CPsin(t)}{cos(s)(f-tan(s)(p))}$$

And if I multiply the cos(s)

$$p* = \frac{Cpcos(t) + Cqsin(t)cos(s)}{fcos(s)-psin(s)}$$

$$q* = \frac{Cqcos(t)cos(s) - Cpsin(t)}{fcos(s)-psin(s)}$$

So what do I do next?