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

Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last
• Sep 22nd 2012, 11:40 AM
MathIsOhSoHard
Can someone explain to me how you execute "Re" and "Im" in a formula?
I know that in a complex number such as

$z=a+bi$

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

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

$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:
$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?

• Sep 22nd 2012, 12:09 PM
SworD
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?
• Sep 22nd 2012, 12:10 PM
Plato
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

$z=a+bi$

"Re" is supposed to be the "real part", which is $a$ so that $Re(a+bi)=a$ and that "Im" is supposed to be the "imaginary part", which is $b$ so that $Im(a+bi)=b$ in the above example.
However, recently I stumpled upon a problem when trying to solve linear systems:
$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:
$Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)-\frac{4}{25}\sin(t)$

$Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)$
AND
$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.
• Sep 22nd 2012, 12:36 PM
Deveno
Re: Can someone explain to me how you execute "Re" and "Im" in a formula?
in general, for a complex number z:

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

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

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

for example:

$\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:

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

parentheses matter!!!!

if so then the real part is:

$\frac{-3}{25}\cos(t) - \frac{4}{25}\sin(t)$
• Sep 22nd 2012, 12:42 PM
MathIsOhSoHard
Re: Can someone explain to me how you execute "Re" and "Im" in a formula?
Quote:

Originally Posted by Plato
$Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)$
AND
$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:
$\frac{dx}{dt}=\begin{bmatrix}2 & -1 \\ 3 & 1 \end{bmatrix}x(t)+\binom{0}{-1}u(t)$
And $y(t)=2x_1(t)-x_2(t)$

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

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

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

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

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

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

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

Inserting into the solution gives:

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

Using Euler's formula we now have:

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

Which according to my book:
$Re\left( \frac{-3+4i}{25}\cos(t)+i\cdot\sin(t) \right)=\frac{-3}{25}\cos(t)-\frac{4}{25}\sin(t)$
• Sep 22nd 2012, 12:48 PM
MathIsOhSoHard
Re: Can someone explain to me how you execute "Re" and "Im" in a formula?
Yes, t is a real variable.
• Sep 22nd 2012, 12:53 PM
Deveno
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.
• Sep 22nd 2012, 01:04 PM
MathIsOhSoHard
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:

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

so that leaves me with:

$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
• Sep 22nd 2012, 01:05 PM
Plato
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:

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

Using Euler's formula we now have:

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

Which according to my book:\
$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.
$Re\left( \frac{i}{5-3i+i^2}e^{it} \right)$ should be written as $y(t)=Re\left( \frac{i}{5-3i+i^2}\left(\cos(t)+i\sin(t) \right) \right)$ There is a set of () missing.

$\text{Re}\left[(a+bi)(c+di)=ac-bd$. If you multiply correctly text is correct if you use the extra set of ().
• Sep 22nd 2012, 01:11 PM
MathIsOhSoHard
Re: Can someone explain to me how you execute "Re" and "Im" in a formula?
Quote:

Originally Posted by Plato
I see several mistakes.
$Re\left( \frac{i}{5-3i+i^2}e^{it} \right)$ should be written as $y(t)=Re\left( \frac{i}{5-3i+i^2}\left(\cos(t)+i\sin(t) \right) \right)$ There is a set of () missing.

$\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:
$-\frac{3}{25}\cos(t)$

But then I don't understand where the fraction $\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.
• Sep 22nd 2012, 01:18 PM
MathIsOhSoHard
Re: Can someone explain to me how you execute "Re" and "Im" in a formula?
I just used the $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?

$Re((a+bi)(c+di))=ac-bd$
$Im((a+bi)(c+di))=bci+adi$

I think I got it now? :D
• Sep 22nd 2012, 01:27 PM
Plato
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:
$-\frac{3}{25}\cos(t)$

But then I don't understand where the fraction $\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.

$\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]$
• Sep 22nd 2012, 01:33 PM
Deveno
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)

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)i2.

but i2 = -1, so:

ac + (ad)i + (bc)i + (bd)i2 = ac + (ad)i + (bc)i + bd(-1) = ac - bd + (ad + bc)i (collecting the "i" terms).
• Sep 22nd 2012, 01:39 PM
MathIsOhSoHard
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?

$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)$
• Sep 22nd 2012, 01:46 PM
Plato
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?
$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 $i$ in the imaginary part.

$\text{Im}(a+bi)=b$ NOT $bi$. I would mark that wrong.
Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last