Items tagged with complex


hello experts,

I was using maple for a physical  problem,

and things turned very complicated with a equation with bessel function in it,

like this BesselI(1, (0.9067480359e-2+0.9067480359e-2*I)*sqrt(f))andBesselI(0., (0.9067480359e-2+0.9067480359e-2*I)*sqrt(f)),

which include complex,

the whole equation is as followed:

the variable is f and RV,,dependent variable is RV.

how am I supposed to plot RV when f=100..4000?

it is certain RV has real part and imaginary part,maybe i need a 3Dplot?

please let me know if you have any idea.

best regards,


-7.873519774*10^18*RV^4+(2.676513624*10^12-3.842712573*10^15*(-1)^(3/4)*BesselI(1, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))/(Pi*sqrt(f)*BesselI(0, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))*(4+623.8617593*(-1)^(3/4)*BesselI(1, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))/(BesselI(0, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))*sqrt(f)))))*RV^2+80864.83845+1.440831316*10^9*(-1)^(3/4)*BesselI(1, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))/(Pi*sqrt(f)*BesselI(0, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))*(4+623.8617593*(-1)^(3/4)*BesselI(1, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))/(BesselI(0, 0.1282335370e-1*(-1)^(1/4)*sqrt(f))*sqrt(f)))) = 0

want to plot the relationship between RV and f,but how?


complexplot(RV, f = 100 .. 4000, labels = ["Re", "Im"])

complexplot(RV, f = 100 .. 4000, labels = ["Re", "Im"])







i went to plot a complex numerical solution , i used odeplot but did not work

please help

Thank you very much 


restart; with(plots)


L := 1;



R := 0.57e-1;



V := evalf(Pi*R^2*L);



pcy := m/V;



Am := 0.6e-1;




k := evalf(2*Pi/(1.56*T*T));



h := 10; -1; zz := h+Am*cos(omega*t)



g := 9.81;



pe := 1025;



T := 3.57;



omega := 2*Pi/T;



m := (1/2)*pe*evalf(Pi*R^2*L);





eq := m*(diff(z(t), `$`(t, 2)))-pe*g*L*R^2-pe*L*R^2*(diff(z(t), `$`(t, 2)))+I*R^3*pe*L*cosh(k*(zz+h))*cos(omega*t)*exp(-I*omega*t)/cosh(k*h)

1.900880195*(diff(diff(z(t), t), t))-32.66950725+(0.1607410765e-1*I)*cosh(6.320462130+0.1896138639e-1*cos(1.759995884*t))*cos(1.759995884*t)*exp(-(1.759995884*I)*t)


csi := z(0) = 0, (D(z))(0) = 0;

z(0) = 0, (D(z))(0) = 0


sol := dsolve({csi, eq}, numeric, maxfun = 0):


sol2 := simplify(evalf(expand(sol))):

fg1 := evalc(Re(sol)):

odeplot(rhs(sol), [t, z(t)], t = 0 .. 3, labels = ["t", "z(t)"], color = blue, thickness = 1, legend = ["z(t) "], axes = boxed)

Error, invalid input: rhs received sol, which is not valid for its 1st argument, expr


complexplot(sol, [t, z(t)], t = 0 .. 3, labels = ["t", "z(t)"], color = blue, thickness = 1, legend = ["z(t) "], axes = boxed)

Error, (in plots:-complexplot) invalid input: `plots/complexplot` expects its 2nd argument, r, to be of type {range, name = range}, but received [t, z(t)]







I posted my question at here
With Mathematica, I got min is 22/5. This result is different from my solution by hand.

Repeat my problem. Let be the number z so that $|z+1| + 4|z-1| = 25$. Find the greastest and the least of the modulus of $z$. How can I find greastest and the least of modulus of z with Maple.

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.

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.

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