Items tagged with complex


Hello everyone, why is maple not able to solve this easy system of equations?

eq1 := 1 = abs(1/(I*Pi*z*(1+I*Pi*a)));
eq2 := -(5/9)*Pi = argument(1/(I*Pi*z*(1+I*Pi*a)));

`assuming`([fsolve({eq1, eq2}, {a, z})], [a::real, z::real]);

 Thanks for helping me! Fabian

Hello, thanks for read me

I don't know why my code don't work, I'm trying to calculate the magnitude of a complex vector but I get a error in the next image you can view it, 


Can someone help me? thank you

Hi, i try the part of Real of the complex expression:

w := A*exp(-alfa(1+I)*y)+B*exp((1+i)*y);
            A exp(-alfa(1 + I) y) + B exp((1 + i) y)
u := Re(w);
          Re(A exp(-alfa(1 + I) y) + B exp((1 + i) y))

But does not work.





I am not very familiar with Maple and have to solve quite a complex equation.

I have an equation which is complex ,containing I . I split this equation up in Re=0 an Im=0 . I have to get an answer in function of other parameters, in order to plot these... Maybe it s easier if you look at the work sheet





(module Student () description "a package to assist with the teaching and learning of standard undergraduate mathematics"; local ModuleLoad, localColors, GetColor, SelectColor, UpdateColor, GetCaption, colorNum, colorDefaults, Defaults, PlotOptionsWindow, InitAnimation, EndAnimation, DoPlayPause, IncrSpd, DecrSpd, Colours, CheckPoint, CheckRange, CheckTextField, CleanFloat, CombineRanges, EvaluateFunction, FindHRange, FindHRange3d, FindVRange, FindVRange3d, GetSpecPoints, EvaluateFunctionNumeric, EvaluateFunctionNumeric3d, VRangeCmp, MaximizePointList, MinimizePointList, FindHRange3dCrossSections, FindVRangeSymbolic, SymEvalFunc, SymLimits, FindAllSpecialPoints, FindHRangeRatPoly, GetRealDomain, GetTextField, GetVariable, IsColour, MapletGenericError, MapletNoInputError, MapletTypeError, ProcessCharacter, ProcessVisual, RequiredError, RemovePlotOptions, mapletColor, mapletDarkColor, mapletLightColor, mapletHelpColor, IsMac, ProcessColorNames; export _pexports, SetColors, SetDefault, SetDefaults, Precalculus, MultivariateCalculus, VectorCalculus, LinearAlgebra, Statistics, Calculus1, NumericalAnalysis, Basics; global x, y, z, r, t, p; option package, `Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2005`; end module)(NumericalAnalysis)


wn := 50



Np := 2





w0 := v0*wn



V0 := 230*sqrt(2)



Ep0 := 1.5*V0




delta := 0



phi[q0] := 0



Iq0 := 0



L := proc (p) options operator, arrow; Ls*(p*tau[r]+1)/(p*tau[r]/sigma+1) end proc

proc (p) options operator, arrow; Ls*(p*tau[r]+1)/(p*tau[r]/sigma+1) end proc


Rs := 2.43



Rr := 2.43



Lr := 0.12e-1+.237



Ls := Lr



M := sqrt(.92*Ls^2)



sigma := 1-M^2/(Ls*Lr)




tau[r] := sigma*Lr*wn/Rr



tau[s] := sigma*Ls*wn/Rs



alpha := tau[r]/tau[s]







assume(v0, 'real', nu, 'real')




phi[d0] := Ls*Id0-Ep0/w0



Vd0 := V0*sin(delta)



Vq0 := V0*cos(delta)



Id0 := (Rs*Vd0-wn*v0*Ls*(Vq0-Ep0))/(Ls^2*w0^2+Rs^2)



Dp := (Rs+p*wn*L(p))^2+v0*wn^2*L(p)^2






N := -(3/2)*Np*[[L(p)^2*(Id0*phi[d0]+Iq0*phi[q0])-L(p)*(phi[d0]^2-phi[q0]^2)]*(p^2+v0^2)*wn^2+Rs*[p*L(p)^2*(Id0^2+Iq0^2)-p*(phi[d0]^2+phi[q0]^2)]*wn+Rs^2*[L(p)*Iq0^2+L(p)*Id0^2-Id0*phi[d0]-Iq0*phi[q0]]]



char := (p*J*wn^2/Np*p)*Dp+N






p := I*nu



R := Re(char)



im := Im(char)







solve(im = 0)

Warning, solve may be ignoring assumptions on the input variables.


Error, (in Engine:-Dispatch) badly formed input to solve: not fully algebraic




Error, (in fsolve) b is in the equation, and is not solved for







I want to plot the eigenvalues of a 4x4 matrix. I know how to determine the eigenvalues, but how do i plot them? Because i saw that plot only works with real numbers. The result is a column vector. 

I want to plot the argument for a complex function. The input (x,y) represented in polar coordinates (r,phi) by default puts the cut at -I*Pi. Likewise the argument function:

argument(f(x)) plots the range -Pi..Pi.

However the function f(x)=x^2 could typically be plotted with 2 riemann surfaces on top of each other. When phi becomes 2Pi f(x) becomes 4Pi and only then I want to identify the 0 with 4Pi again since the points are equivalent in the preimage.

On the other hand the function f(x)=sqrt(x) never surpasses its own domain. The values always stay within the argument range of (0,2Pi) (in fact it only goes till Pi, or -Pi/2..Pi/2 in maple) when the preimage is taken to be (0,2Pi). Thus when plotting a preimage value of (x,y) with argument phi and 2Pi+phi they will have the same value since phi=2Pi+phi and I see a step in the plot. This step is actually there since the function has a cut at this point.

This step in the plotting image is also shown for f(x)=x^2 (e.g. at phi=+-Pi/2) but it is not of importance since it just comes from the argument function being constrained to -Pi..Pi.

So is it possible to change this behaviour?

I have some data

> X:=[291.3301386,349.9410125,420.7945287,490.0836935,558.1365585,623.6824877,688.6344191,752.1359797,814.1871695,874.7879884,933.8452525,991.0023402,1047.88822,1102.687556,1156.036521,1207.200419]:

> Y:=[0.008923638,0.010336322,0.012031554,0.013676089,0.01527851,0.016809936,0.018315901,0.019777093,0.021194266,0.022568158,0.023897399,0.025174796,0.026437267,0.027645069,0.02881302,0.029925828]:

to which I am trying to fit a function

U:=(m,d,Theta,T)-> (((3*(6.62607e-34)^2*T)/(4*Pi^2*m*1.36085e-23*Theta^2))*((T/Theta)*int(x/(exp(x)-1),x=0..Theta/T) + (Theta/(4*T))))/1e-10^2 +d^2;

where Theta≈200 and d≈0.035. T, Theta, d, m > 0

 When I try and solve

> NonlinearFit(U(0.15036/6.022e23,d,Theta,T),X,Y,T,initialvalues=[Theta=200, d=0.035]);

I get the error "Error, (in Statistics:-NonlinearFit) complex value encountered"


I can plot the function with Theta=200 and d=0.035, I get approximately the right curve and no errors about complex values.


How can I solve for Theta and d without encountering this error?

I would like to apply inverse Laplace transform to U(x,p), which is defined by

For simplicity with my calculations, I assumed p:=i*beta^2. That is why I have the following equation after applying Laplace transform

(beta=0 is not a pole, that is why I removed the last term in my calculations later. Because there is no contribution) where

Here p and beta are complex values, we can write Re(p)=-2*Re(beta)*Im(beta), Im(p)=(Re(beta))^2-(Im(beta))^2 due to p:=i*beta^2. I numerically compute the roots of h(beta), you can find the numerical values of beta (I assumed digits are 50 due to accuracy )

Finally, I would like to plot U(x,t) with the values t=0.8, lambda=1, L=10, k=1. For checking the figure give t=0 and observe that U(x,0)=0.

I am expecting the plot is more or less like the following figure

PS: I already tried to solve and plot the problem, but I could not find where I make a mistake. I  share the worksheet below. Thank you!

I am working in Document mode, 2D input.  I have doing some complex number evalutions

Lets say I have a complex number Z= 2+3i

when I ask maple for the "abs(Z)" I get the display of "abs(2+3i)" rather than the numberic answer. This occurs with all the complex operation arg, abs, polar conversion, 

polar(abs(2+3*i), argument(2+3*i))   this is from Maple. 

How do I display the numeric value for these functions in my document


Thanks Bill

Below z is made using different complex values on polar form, and I then need to express the resulting z on polar form with numeric values for length and angle.  However, I had no luck using evalc, evalf, or other I could find.

How can I convert z to a polar form with numeric arguments like shown below ?

How can I plot the complex function f(z)=1/(1-z) for |z|<1 into maple code? (z is a complex number)


Best regards,


In plots made with 'complexplot3d', Maple uses by default a color wheel for the argument of complex numbers in which positive numbers are painted cyan and negative numbers are red. Is there a way to change this to the other common convention (i.e. cyan negative and red positive numbers)?


Any help would be really appreciated, as it's not convenient to have graphs made with different conventions in the same document and I wouldn't want to remake all the ones I already have.

I have problem to get real answer in a simple equation. maple just give me complex answer.

how i can get parametric real answer? Ihave trid this two way but not applicaple.

with(RealDomain); assume(T::real)

My code is:
Qz := 7.39833755306637215940309264474*10^7*sqrt(1/T)*(T-297.2)/T-16242.7935852035929839431551189*sqrt(1/T)/T;

q := (.6096*(299.2-T))/(sqrt(1.60000000000000000000000000000*10^(-9)-r^2)-0.346410161513775458705489268300e-4);

with(RealDomain); assume(T::real);

e := simplify(solve({0 = q-Qz}, {T}))

and the result like:

e := {T = 1/RootOf(-609600000000000000000000000000000000000000000000000000000+(879515018020273730453559011332895956000000000000000000000000000*sqrt(-625000000*r^2+1)-761682348615485390130551939524898425387968750740910059296172487)*Z^5+(-2959335021226548863761237057896000000000000000000000000000000*sqrt(-625000000*r^2+1)+2562859306691152293409465394507279449380503585614734443742000)*_Z^3+182392320000000000000000000000000000000000000000000000000000*_Z^2)^2}

dose anyone hase any opinion?

Greetings to all.

With the following matter I am betting on there being a simple mistake on my part due to fatigue owing to a challenging session of intense computing. The following link at Math.Stackexchange.Com points to a computation involving complex residues. Consult the link for additional details.

I usually verify my computations with Maple, I did the same this time. Thereby I happened on a curious phenomenon which I have documented below. Please study the session data provided, I believe it speaks for itself.

user@host:~$ math
Mathematica 10.0 for Linux x86 (64-bit)
Copyright 1988-2014 Wolfram Research, Inc.

In[1]:= Residue[z^2/(z^4 + 2*z^2 + 2)^2, {z, 2^(1/4)*Exp[3*Pi*I/8]}]

            1/8      1/4
        (-1)    ((-1)    + Sqrt[2])
Out[1]= ----------------------------
            1/4      1/4           3
        16 2    ((-1)    - Sqrt[2])

In[2]:= N[%]

Out[2]= 0.117223 - 0.0083308 I

user@host:~$ maple
    |\^/|     Maple 18 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> residue(z^2/(z^4 + 2*z^2 + 2)^2, z=2^(1/4)*exp(3*Pi*I/8));

> quit
memory used=0.9MB, alloc=8.3MB, time=0.07

I am looking forward to learning what the correct syntax is to get the residue in this case and I hope I can assist other users who might have run into the same problem. I will cancel the question should it turn out to be trivial and of little potential use to the community.

Best regards,

Marko Riedel

Post Scriptum. Being a programmer myself I would be curious to learn more about the algorithms that are deployed here and how and why they did not succeed.

Dear all,

I have a question: how to compute the roots of exp(z) = -1 with z in C? 

I tried: 

fsolve( exp(z) = -1, z, complex );

But it only gives one root (0.1671148658e-3+4.934802220*10^9*I) which does not even seem to be correct. I would prefere smth like z_n = I*(2*n-1)*pi or at least multiple roots...

By using

solve(exp(x) = -1, x);

it returns I*Pi.


MATLAB MuPAD gives the desired result:

solve(exp(x) = -1, x)

(PI*I + 2*PI*k*I, k in Z)




1 2 3 4 5 6 7 Last Page 1 of 28