# Adding multiple Complex Numbers in Euler form

Say I have a series of $n$ complex numbers of the form $A_k e^{(I \ \theta_k x)}$ where $A_k$ is a real number and so is $\theta_k$ and $k$ runs from $1$ to $n$. $x$ is an algebraic symbol.

Example I have to calculate:-

$3e^{5Ix}+10e^{7Ix}+2e^{1Ix}$

Now I need to find the summation of the series. I can do this manually because I know all the phase angles (in terms of x) and the lengths of the complex numbers in space, so I will simply add them up like vectors using the parallelogram law and apply the appropriate formulas to successfully reduce the sum of the series to one number say $R e^{I\ F}$ where R and F will be functions in $x$. How do I calculate this number with Mathematica?

-
Did you try just typing the sum into Mathematica and evaluating it? Is that result inadequate in some way? –  David Z Feb 3 '13 at 8:48
When I Type say : 3 Exp[5 x i] + 10 Exp[7 x i] + 2 Exp[1 x i] , it just gives me back the same thing in standard form. –  swanar Feb 3 '13 at 8:54
OK, but then what result are you looking for? What sort of simplification do you expect Mathematica to make? (Note that this sum can't be written as a single term of the form $Re^{i\theta x}$, if that's what you had in mind.) –  David Z Feb 3 '13 at 8:56
The simplification will be such that finally the answer should be in $R e^{i F}$ form. R and F will be functions in x. Thankyou for correcting I have modified the original problem a bit. –  swanar Feb 3 '13 at 9:00
Do you really use lowercase 'i'? That should be I or esc i esc. –  Sjoerd C. de Vries Feb 3 '13 at 9:04

number = 3 E^(5 I x) + 10 E^(7 I x) + 2 E^(1 I x);
abs = ComplexExpand[Abs[number], TargetFunctions -> {Re, Im}];
arg = ComplexExpand[Arg[number], TargetFunctions -> {Re, Im}];
abs E^(I arg)


it gives : $e^{i \text{ArcTan}[2 \text{Cos}[x]+3 \text{Cos}[5 x]+10 \text{Cos}[7 x],2 \text{Sin}[x]+3 \text{Sin}[5 x]+10 \text{Sin}[7 x]]} \surd \left((2 \text{Cos}[x]+3 \text{Cos}[5 x]+10 \text{Cos}[7 x])^2+(2 \text{Sin}[x]+3 \text{Sin}[5 x]+10 \text{Sin}[7 x])^2\right)$

-

You could do :

points = {3 Exp[5 x I], 10 Exp[7 x I], 2 Exp[1 x I]};
eqn = ComplexExpand[Total[points] - r Exp[I f], TargetFunctions -> {Re, Im}];
cond = r >= 0;