Can someone explain to me how you execute "Re" and "Im" in a formula?

I know that in a complex number such as

$\displaystyle z=a+bi$

"Re" is supposed to be the "real part", which is $\displaystyle a$ so that $\displaystyle Re(a+bi)=a$ and that "Im" is supposed to be the "imaginary part", which is $\displaystyle b$ so that $\displaystyle Im(a+bi)=b$ in the above example.

However, recently I stumpled upon a problem when trying to solve linear systems:

$\displaystyle y(t)=Re(H(i\omega)e^{i\omega t})$

I'm not sure that I understand how exactly to execute this formula with the "Re" part.

Here is an example:

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)-\frac{4}{25}\sin(t)$

Can somebody explain to me what the "Re" did here?

And what about "Im"? If it had said "Im" instead, what would be different in the answer?

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Edit: when I look at it more closely Im confused myself... is t a real variable?

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**MathIsOhSoHard** I know that in a complex number such as

$\displaystyle z=a+bi$

"Re" is supposed to be the "real part", which is $\displaystyle a$ so that $\displaystyle Re(a+bi)=a$ and that "Im" is supposed to be the "imaginary part", which is $\displaystyle b$ so that $\displaystyle Im(a+bi)=b$ in the above example.

However, recently I stumpled upon a problem when trying to solve linear systems:

$\displaystyle y(t)=Re(H(i\omega)e^{i\omega t})$

I'm not sure that I understand how exactly to execute this formula with the "Re" part.

Here is an example:

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)-\frac{4}{25}\sin(t)$

Your example is incorrect.

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)$

AND

$\displaystyle Im\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{4}{25}\cos(t)+\sin(t)$

**Now did you copy it correctly.**

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

in general, for a complex number z:

$\displaystyle \operatorname{Re}(z) = \frac{z + \overline{z}}{2}$

$\displaystyle \operatorname{Im}(z) = \frac{z - \overline{z}}{2i}$

so if $\displaystyle z = a+bi$, then $\displaystyle \operatorname{Re}(z) = a, \operatorname{Im}(z) = b$.

for example:

$\displaystyle \operatorname{Re}(e^{i\omega t}) = \cos(\omega t)$.

what you want to do, if you have complex expressions multiplied together, is first "multiply them out", to get something in the form a+bi.

EDIT: i suspect what you actually WANT is:

$\displaystyle \operatorname{Re}\left(\left(\frac{-3+4i}{25}\right)(\cos(t) + i\sin(t))\right)$

parentheses matter!!!!

if so then the real part is:

$\displaystyle \frac{-3}{25}\cos(t) - \frac{4}{25}\sin(t)$

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**Plato** Your example is incorrect.

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)$

AND

$\displaystyle Im\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{4}{25}\cos(t)+\sin(t)$

**Now did you copy it correctly.**

Yes, I have looked at it 5 times now and my book writes this as a solution. Here it is in its entirety:

A linear system is given as:

$\displaystyle \frac{dx}{dt}=\begin{bmatrix}2 & -1 \\ 3 & 1 \end{bmatrix}x(t)+\binom{0}{-1}u(t)$

And $\displaystyle y(t)=2x_1(t)-x_2(t)$

The transfer function is calculated to $\displaystyle H(s)=\frac{s}{5-3s+s^2}$ and given that $\displaystyle u(t)=cos(t)$ then a linear system has the solution:

$\displaystyle y(t)=Re(H(i\omega)e^{i\omega t})$

Where $\displaystyle u(t)=cos(\omega t)$

Since in this example, $\displaystyle \omega=1$ we have the formula for the solution:

$\displaystyle y(t)=Re(H(i)e^{it})$

Replacing "s" with the imaginary unit in the transfer function:

$\displaystyle H(i)=\frac{i}{5-3i+i^2}$

Inserting into the solution gives:

$\displaystyle y(t)=Re\left( \frac{i}{5-3i+i^2}e^{it} \right)$

Using Euler's formula we now have:

$\displaystyle y(t)=Re\left( \frac{i}{5-3i+i^2}\cos(t) + i \sin(t) \right)$

Which according to my book:

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)-\frac{4}{25}\sin(t)$

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Yes, t is a real variable.

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

see my post above. you are missing parentheses. people are thinking you mean the fraction is just times the cosine term, instead of the entire cosine + imaginary sine expression.

what you have are two complex numbers multiplied together.

now (a+bi)(c+di) = (ac - bd) + (ad + bc)i, and the real part of this is ac - bd.

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**Deveno** see my post above. you are missing parentheses. people are thinking you mean the fraction is just times the cosine term, instead of the entire cosine + imaginary sine expression.

what you have are two complex numbers multiplied together.

now (a+bi)(c+di) = (ac - bd) + (ad + bc)i, and the real part of this is ac - bd.

Ah yes, that is true. This is how it should be then:

$\displaystyle Re\left( \frac{-3+4i}{25}(\cos(t)+i\cdot\sin(t)) \right)$

so that leaves me with:

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+\frac{-3+4i}{25}i\cdot\sin(t)) \right)=-\frac{3}{25}\cos(t)+???$

But isn't 4i a part of the imaginary part? So how does that fit into the solution? :S

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**MathIsOhSoHard** Yes, I have looked at it 5 times now and my book writes this as a solution. Here it is in its entirety:

Inserting into the solution gives:

$\displaystyle y(t)=Re\left( \frac{i}{5-3i+i^2}e^{it} \right)$

Using Euler's formula we now have:

$\displaystyle y(t)=Re\left( \frac{i}{5-3i+i^2}\cos(t) + i \sin(t) \right)$

Which according to my book:\

$\displaystyle Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)-\frac{4}{25}\sin(t)$

I see several mistakes.

$\displaystyle Re\left( \frac{i}{5-3i+i^2}e^{it} \right)$ should be written as $\displaystyle y(t)=Re\left( \frac{i}{5-3i+i^2}\left(\cos(t)+i\sin(t) \right) \right)$ There is a set of () missing.

$\displaystyle \text{Re}\left[(a+bi)(c+di)=ac-bd$. If you multiply correctly text is correct if you use the extra set of ().

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**Plato** I see several mistakes.

$\displaystyle Re\left( \frac{i}{5-3i+i^2}e^{it} \right)$ should be written as $\displaystyle y(t)=Re\left( \frac{i}{5-3i+i^2}\left(\cos(t)+i\sin(t) \right) \right)$ There is a set of () missing.

$\displaystyle \text{Re}\left[(a+bi)(c+di)=ac-bd$. If you multiply correctly text is correct if you use the extra set of ().

Yes that is true about the parentheses. But I'm still not sure I understand the last part.

So we have that [TEX]\frac{-3+4i}{25}[TEX] where the 4i is the imaginary part, so that disappears, leaving:

$\displaystyle -\frac{3}{25}\cos(t)$

But then I don't understand where the fraction $\displaystyle \frac{4}{25}$ comes from. Isn't 4i the imaginary part?

What is the multiplication rule that you mention? I haven't seen that before.

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

I just used the $\displaystyle Re(a+bi)(c+di)=ac-bd$ and that worked out really well!

But I've never seen this rule before? :S

Also is there a similar rule for Im?

Okay, is this correct then?

$\displaystyle Re((a+bi)(c+di))=ac-bd$

$\displaystyle Im((a+bi)(c+di))=bci+adi$

I think I got it now? :D

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**MathIsOhSoHard** Yes that is true about the parentheses. But I'm still not sure I understand the last part.

So we have that [TEX]\frac{-3+4i}{25}[TEX] where the 4i is the imaginary part, so that disappears, leaving:

$\displaystyle -\frac{3}{25}\cos(t)$

But then I don't understand where the fraction $\displaystyle \frac{4}{25}$ comes from. Isn't 4i the imaginary part?

What is the multiplication rule that you mention? I haven't seen that before.

$\displaystyle \left( \frac{-3+4i}{25}\left(\cos(t)+i\sin(t) \right) \right)=\left[ {\frac{{ - 3\cos (t)}}{{25}} - \frac{{4\sin (t)}}{{25}}} \right] + i\left[ {\frac{{ - 3\sin (t)}}{{25}} + \frac{{4\cos (t)}}{{25}}} \right]$

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

it's very simple.

to find the real part of a complex number easily, you have to have it in the form:

(something real) + i (something else that's real).

now what you have is a complex fraction (a+bi)/d. that is the complex number (a/d) + (b/d)i.

you have it multiplied by another complex number: cos(t) + i sin(t).

when we multiply these together:

[(a+bi)/d](cos(t) + i sin(t)), we get:

(a/d)cos(t) - (b/d)sin(t) + [(a/d)sin(t) + (b/d)cos(t)]i

the real part is thus: (a/d)cos(t) - (b/d)sin(t) and the imaginary part is:

(a/d)sin(t) + (b/d)cos(t)

in your example above:

a = -3

b = 4

d = 25

yes, the imaginary part of (a+bi)(c+di) is: ad+bc. why? this is the very DEFINITION of complex multiplication:

(a+bi)(c+di) = a(c+di) + (bi)(c+di) = ac + (ad)i + (bi)c + (bi)(di) = ac + (ad)i + (bc)i + (bd)i^{2}.

but i^{2} = -1, so:

ac + (ad)i + (bc)i + (bd)i^{2} = ac + (ad)i + (bc)i + bd(-1) = ac - bd + (ad + bc)i (collecting the "i" terms).

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Thanks both of you! :)

Just to see if I got it, if I in my example had "Im" instead of "Re" would this then be correct?

$\displaystyle Im\left( \frac{-3+4i}{25}(\cos(t)+i\cdot\sin(t)) \right)=Im\left( \left( \frac{-3}{25} + \frac{4}{25} i \right) \left( \cos(t) + i\cdot \sin(t)\right) \right)=\frac{4}{25}\cdot i \cos(t) + \frac{-3}{25}\cdot i \sin(t)$

Re: Can someone explain to me how you execute "Re" and "Im" in a formula?

Quote:

Originally Posted by

**MathIsOhSoHard** Just to see if I got it, if I in my example had "Im" instead of "Re" would this then be correct?

$\displaystyle Im\left( \frac{-3+4i}{25}(\cos(t)+i\cdot\sin(t)) \right)=Im\left( \left( \frac{-3}{25} + \frac{4}{25} i \right) \left( \cos(t) + i\cdot \sin(t)\right) \right)=\frac{4}{25}\cdot i \cos(t) + \frac{-3}{25}\cdot i \sin(t)$

**There is no $\displaystyle i$ in the imaginary part.**

$\displaystyle \text{Im}(a+bi)=b$ **NOT** $\displaystyle bi$. I would mark that wrong.