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?

  • $\begingroup$ Did you try just typing the sum into Mathematica and evaluating it? Is that result inadequate in some way? $\endgroup$ – David Z Feb 3 '13 at 8:48
  • $\begingroup$ 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. $\endgroup$ – swanar Feb 3 '13 at 8:54
  • $\begingroup$ 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.) $\endgroup$ – David Z Feb 3 '13 at 8:56
  • $\begingroup$ 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. $\endgroup$ – swanar Feb 3 '13 at 9:00
  • $\begingroup$ Do you really use lowercase 'i'? That should be I or esc i esc. $\endgroup$ – 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;

sol = Reduce[Thread[And[Thread[Simplify[{Re[eqn], Im[eqn]}, 
        Assumptions -> {x \[Element] Reals, r \[Element] Reals, f \[Element] Reals}] == 0], cond]], 
       {r, f}, Reals];

(sol /.  {C[1] -> 0, x -> Pi/4})
(* r == Sqrt[101] && 
   f == -2 ArcTan[Sqrt[(3/Sqrt[2] - 6 Sqrt[2] + Sqrt[101])/(-(3/Sqrt[2]) + 6 Sqrt[2] + 
        Sqrt[101])]] *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.