# Homework Help: Finding the real and imaginary part

1. Nov 9, 2013

### thercias

1. The problem statement, all variables and given/known data
Determine the real part, the imaginary part, and the absolute magnitude of the following expressions:
tanh(x-ipi/2)
cos(pi/2-iy)

2. Relevant equations
cos(x) = e^ix+e^-ix
tanh(x) = (1-e^-2x)/(1+e^-2x)

3. The attempt at a solution
for cos(pi/2-iy)= (e^(ipi/2-i^2(y))+e^(i^2(y)-ipi/2))/2
=0.5(e^ipi/2*e^-i^2y + e^i^2y*e^-ipi/2)
=0.5(ie^y+e^-y*-i)
=0.5i(e^y-e^-y)
therefore, imaginary = 0.5(e^y-e^-y)
and real = 0

for tanh(x-ipi/2) = (1-e^-2(x-ipi/2))/(1+e^-2(x-ipi/2))
after simplifying i get
(1+e^-2x)/(1-e^-2x)
so that ^ is the real part
and imaginary = 0

I'm not really sure if im doing this right though, or if i have to somehow simplify these expressions to get the answer. If so, how would I solve the question?

2. Nov 9, 2013

### FeDeX_LaTeX

It's simpler to note that $\cos\left(\frac{\pi}{2} - iy\right) = \sin(iy)$.

There's a sign error here, otherwise, your final answers are correct -- it's a lot easier if you write it in terms of a hyperbolic trig function.

That's correct too. Can you write that answer in terms of a hyperbolic trig function?

3. Nov 9, 2013

### thercias

i cant find the sign mistake that you're referring to. and yes, the second one would be coth(x)

4. Nov 9, 2013

### FeDeX_LaTeX

My apologies, no sign error. Looks correct to me.

5. Nov 9, 2013

### thercias

Alright thanks, as for finding the absolute magnitude, would the expressions above simply be the answer?
if absolute mag = |a + bi| = sqrt(a^2 +b^2)= sqrt(0^2+0.5(e^y-e^-y)^2) =0.5(e^y-e^-y)
for the second = sqrt(coth(x)^2) = coth(x)

6. Nov 9, 2013

### FeDeX_LaTeX

I'm not convinced about that. $\sinh(x)$ and $\coth(x)$ can take on negative values, can they not?

7. Nov 9, 2013

### thercias

So it's just going to be the + and - values of the above? Since you're taking the square root of it.

8. Nov 9, 2013

### FeDeX_LaTeX

Yes (for positive and negative arguments). Either way, $|\coth(x)| = \coth(x)$ and $|\sinh(x)| = \sinh(x)$ definitely do not hold true for all x! It's best to either leave it in absolute value form or define your function separately for different values of x.