Tag Info

New answers tagged

2

Something like this: ComplexExpand[ Solve[ { Re[(1 - Sqrt[x - I y])/(1 + Sqrt[x - I y])] == A, Im[(1 - Sqrt[x - I y])/(1 + Sqrt[x - I y])] == B }, {A, B} ], TargetFunctions -> {Re, Im} ] (* {{A -> 1/((1 + (x^2 + y^2)^(1/4)*Cos[(1/2)*ArcTan[x, -y]])^2 + Sqrt[x^2 + y^2]*Sin[(1/2)*ArcTan[x, -y]]^2) - ...


0

You can't Plot a complex function. But you can always plot the Re and Im part of the solution. eqn[x_, y_, z_] := z^2 + 3 z + x^2 + y^2 == 0 sol[x_,y_]=z/.Solve[eqn[x,y,z],z] ContourPlot[Re[sol[x,y]][[2]],{x,0,2},{y,0,2},MaxRecursion->3,PlotLabel->"Real"] ContourPlot[Im[sol[x,y]][[2]],{x,0,2},{y,0,2},MaxRecursion->3,PlotLabel->"Imaginary"] ...


10

I think what you're seeing is a consequence of the special model that you're using. The parameters a and b appear only linearly, so as long as they are the only fit parameters it is clear that the best approach for FindFit would be to perform a simple LeastSquares calculation. This is a matrix method that works over the complex numbers, and that's why you ...


7

For the reason why find fit fails when c is variable, please see the answer of Jens. One way to solve this is to use create the complex target function from real-valued parameters and set the NormFunction explicitely: f1[t_] := (br + I bi) + (ar + I ai)/(cr + I ci + t) fit = FindFit[data, f1[t], {ar, ai, br, bi, cr, ci}, t, NormFunction -> ...


0

You can simplify the procedure: Putting Im under ComplexExpand you get immediately In[182]:= ComplexExpand[Im[Exp[I*t]/(1 - Exp[I*t])]] Out[182]= Sin[t]/((1 - Cos[t])^2 + Sin[t]^2) Simplifying this leads to the final result In[183]:= Simplify[%] Out[183]= 1/2 Cot[t/2] Treating the real part similarly leads to In[184]:= ComplexExpand[Re[Exp[I*t]/(1 ...



Top 50 recent answers are included