Complex Numbers - Given $(a+b) +i(a-b) = (1+i)^2 + i(2+i)$ obtain the values of $a$ and $b$. This would be a very easy complex number question to someone I understand of most of it its just one of those questions I should know but I've stared at it so much I'm stuck! could someone please explain it to me! here it is:
Question - Given $(a+b) +i(a-b) = (1+i)^2 + i(2+i)$ obtain the values of $a$ and $b$. Note $i=\sqrt{(-1)}$ 
Thank you all! hope to hear from you soon!
 A: Just do it.
$(1+i)^2 + i(2+i) =$
$(1 + 2i + i^2)+(2i + i^2)=$
$(1 + 2i -1) + (2i - 1)=$
$-1 + 4i$
So $-1 + 4i = (a+b) + (a+b)i$
So $a + b = -1$ and $a+b = 4$.
Well, no wonder you are stuck!  You were given an impossible equation.
====
From your commments it sounds like what you we actually given was
$(a+b) + (a-b)i = (1+i)^2 + i(2+i)$
or maybe something else?
You still do it the same way:
$(1+i)^2 + i(2+i) = -1 + 4i$
so $(a+b) +(a-b)i = -1 + 4i$
so $a+b = -1$ and $a-b = 4$.
This is solvable. 
$a = - 1 - b$
$-1-b -b = 4$
$-2b = 5$
$b = -5/2$
$a = -1 -(-5/2) = 3/2$.
or....
$a + b = -1$
$a - b = 4$
$(a + b) + (a-b) = -1 + 4$
$2a = 3$
$a = 3/2$
$(a +  b) - (a-b) = -1 -4$
$2b = -5$
$b = -5/2$.
A: Hint: The trick is to see that the real part of $(1+i)^2 + i(2+i)$ is $(a+b)$, while the imaginary part is given by $(a-b)$. So if you can simplify that equation to be of the form $x+iy$, you then know that $x=a+b$ and $y=a-b$, which you then can solve. 
A: Generalize the question, when $\text{m}\space\wedge\space\text{w}\in\mathbb{R}$ and $\text{q}\space\wedge\space\text{z}\in\mathbb{C}$:
$$\text{m}+\text{w}i=\text{q}^2+\text{z}i$$
We can set:


*

*$$\text{q}^2=\left(\Re[\text{q}]+\Im[\text{q}]i\right)^2=\Re^2[\text{q}]-\Im^2[\text{q}]+2\Re[\text{q}]\Im[\text{q}]i$$

*$$\text{z}i=\left(\Re[\text{z}]+\Im[\text{z}]i\right)i=-\Im[\text{z}]+\Re[\text{z}]i$$


Now, when $2\Re[\text{q}]=\Re[\text{z}]$ and $\Im[\text{q}]=\Im[\text{z}]$:
$$\text{q}^2+\text{z}i=\Re^2[\text{q}]-\Im^2[\text{q}]-\Im[\text{q}]+i\left(2\Re[\text{q}]\Im[\text{q}]+2\Re[\text{q}]\right)$$
So, now we know:


*

*$$\text{m}=\Re\left[\text{q}^2+\text{z}i\right]=\Re^2[\text{q}]-\Im^2[\text{q}]-\Im[\text{q}]$$

*$$\text{w}=\Im\left[\text{q}^2+\text{z}i\right]=2\Re[\text{q}]\Im[\text{q}]+2\Re[\text{q}]=2\Re[\text{q}]\left(1+\Im[\text{q}]\right)$$



Now, with your information $\text{m}=\text{a}+\text{b}$ and $\text{w}=\text{a}-\text{b}$ and assuming that $\text{a}\space\wedge\space\text{b}\in\mathbb{R}$ and $\text{q}=1+i$ and $\text{z}=2+i$:
$$
\begin{cases}
\text{m}=\text{a}+\text{b}=\Re\left[(1+i)^2+(2+i)i\right]=\Re^2[1+i]-\Im^2[1+i]-\Im[1+i]=-1\\
\text{w}=\text{a}-\text{b}=\Im\left[(1+i)^2+(2+i)i\right]=2\Re[1+i]\left(1+\Im[1+i]\right)=4
\end{cases}
$$
So:


*

*$$\text{a}=\frac{3}{2}$$

*$$\text{b}=-\frac{5}{2}$$

