Items tagged with argument


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?

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.

Dear All

I have updated my Maple 18, I am surprised to see that ordinary "solve" do not work and return error massage like;

"Error, (in coulditbe) invalid input: `coulditbe/internal` uses a 1st argument, obj, which is missing"

or like;

"Error, (in solve) invalid input: hastype expects 2 arguments, but received 1"

I am totally confused !!!

Can anybody help me out please !!!!



solve({x+2*y = 3, y+1/x = 1}, [x, y])

Error, (in coulditbe) invalid input: `coulditbe/internal` uses a 1st argument, obj, which is missing


solve({x+2*y = 3, y+1/x = 1}, {x, y})

Error, (in solve) invalid input: hastype expects 2 arguments, but received 1






Im solving 4 ODE equations with BC. im trying to shoot the initial value but im having this error:

""Error, (in isolate) cannot isolate for a function when it appears with different arguments""

anyone could help me???



Shootlib := "E:\\shooting/":

libname := Shootlib, libname:



n := 2:

FNS := {F(eta), H(eta), f(eta), g(eta), u(eta), v(eta)}:

ODE := {g(eta)*(diff(g(eta), eta))+B*(f(eta)+g(eta)) = 0, g(eta)*(diff(F(eta), eta))+F(eta)^2+B*(F(eta)-u(eta)) = 0, g(eta)*(diff(H(eta), eta))+H(eta)*(diff(g(eta), eta))+F(eta)*H(eta) = 0, diff(v(eta), eta)+f(eta)*v(eta)-u(eta)^2+B*H(eta)*(F(eta)-u(eta))-M*u(eta) = 0, diff(f(eta), eta) = u(eta), diff(u(eta), eta) = v(eta)};

{g(eta)*(diff(H(eta), eta))+H(eta)*(diff(g(eta), eta))+F(eta)*H(eta) = 0, g(eta)*(diff(g(eta), eta))+0.2e-1*f(eta)+0.2e-1*g(eta) = 0, g(eta)*(diff(F(eta), eta))+F(eta)^2+0.2e-1*F(eta)-0.2e-1*u(eta) = 0, diff(v(eta), eta)+f(eta)*v(eta)-u(eta)^2+0.2e-1*H(eta)*(F(eta)-u(eta))-3*u(eta) = 0, diff(f(eta), eta) = u(eta), diff(u(eta), eta) = v(eta)}


IC := {F(0) = gamma, H(0) = Q, f(0) = 0, g(0) = z, u(0) = 1, v(0) = alpha};

{F(0) = gamma, H(0) = Q, f(0) = 0, g(0) = z, u(0) = 1, v(0) = alpha}


BC := {F(L) = 0, H(L) = n, g(L) = -f(L), u(L) = 0};

{F(6) = 0, H(6) = 2, g(6) = -f(6), u(6) = 0}


infolevel[shoot] := 1:

S := shoot(ODE, IC, BC, FNS, [alpha = 0, gamma = 0, z = -.2, Q = 0])

Error, (in isolate) cannot isolate for a function when it appears with different arguments





Hi there!

I want to improve the way I code up my procedures. For instance I want to code them safe in the sense that they only accept the arguments when they have the correct type.

I know that in principle this is done with the double-colon operator in the following way:



(Q1)Now, given that my argument is of a type such as set, list, Array, etc.:

(a) How would I specify the allowed types of the elements of that list (for all elements, and for specific ones)? And if the element of the list is a list again, how would I specify the type of that's elements? and so forth..

(b) How would I specify the allowed size of the listArray, etc. ?


(Q2) How do I specify the types of more than one output, if my proc returns more than one value?


(Q3) I know that there are special integer types, such as nonnegint, posint, negint. Is there also a way to specify that the ineger (or float) argument has to be greater than some given value, e.g. >2, or that it has to lie between two values, or out of a given set?


Thats all for now. Thanks for your help guys! : )


I am trying to solve the following integral


with respect to x, between zero and infinity.

If i just integrate it the result that I obtain is

(alpha^2*beta^(alpha+1)*exp(beta)*GAMMA(-alpha-1, beta)+alpha*beta^(alpha+1)*exp(beta)*GAMMA(-alpha-1, beta)+beta-alpha)/beta

My problem is that the alpha is positive and consequently the GAMMA functions do not exist, since the argument...

I'd like to be able to get a quicker low accuracy computation of the argument of the complex-valued JacobiTheta1 function.

I only need as much accuracy as to get a decent plot, which means... I don't know... about 1e-3 relative accuracy?

If I can get a formula or approach that is "evalhf'able" then I can construct a procedure which does this action and writes results inplace to a float[8] Matrix.

The naive approach in the code below takes about 6min...

I have written a procedure to overload a new "Subs" function. It uses a seq of equations as its first argument followed by the object to act upon (yes, it is to have subs functionality on these objects). I find the overloading works when I have just one equation in the argument list, but with more than one it never calls any of the procedures. The code worked with multiple equations before I overloaded it (i.e. the first proc was verified by itself). FWIW the objects (elemt or bm...

Hi all. I am trying to find the cube roots of -sqrt(6)-sqrt(18)*I in polar form. I have used the following commands but it does not convert the argument properly. Can anyone help? readlib(polar); sola:=solve(z^3=-sqrt(6)-sqrt(18)*I,z); polar(sola[1]); polar(sola[2]); polar(sola[3]); I have also used the following but it could not simplify the argument/angle. sola1 := simplify(convert(sola[1], polar)); Can anyone please suggest a fix to this? The argument...

I have a module which is an argument to a procedure.

When I "trace" this procedure, the entire module is  printed (as it should).

Is there a way to NOT print the contents of the passed module? It is annoying when debugging.



I simplified the real task and

the principal problem is how to assign a condition( if x < 3 then t := 0 elif x >= 3 then t := 5 end if) to a variable t which depends on x (x is a argument of function g(x))?

Is it possible at all without writing the procedure?

Here is the code:

g := proc (x) options operator, arrow; 2*x+t end proc; if x < 3 then t := 0 elif x >= 3 then t := 5 end if; plot(g(x))

i am successfully transforming a 2D plot, when doing the exact analog thing to a 3D plot i get the error message 

Error, (in t) invalid input: unknown uses a 3rd argument, z, which is missing


i have no idea what's going on, please advise.


i made a minimum example:

this works:

> restart:with(plots):with(plottools):
> norm2:=x->x[1]^2+x[2]^2:
> N:=[0,1]:
> phi:=(x,y)->N+2*([x,y]-N)/norm2([x,y]-N):

Find the principal arguments of the 5 roots of the polynomial:p(z)=z^5-5*z^4-5*z-5,and enter a decimal approximation to the largest principal argument in the box below.  Your approximation should be correct to 10 significant figures


Can some one tell me how to write in maple?correct answer is 2.691121659


Page 1 of 1