Items tagged with error

Good day!

As part of an exercise I've calculated the length of a hypotrochoid numerically. To check my result I repeated the calculation in Maple, but received a different result. When double checking using WolframAlpha I got the same result as with my numerics. Maybe someone of you can tell me where I made a mistake.

Thanks in advance.

Link to WolframAlpha calculation:*+t%29,+y%28t%29+%3D+%281-0.6%29+sin%28t%29+-+0.8+sin+%28+%281-0.6%29%2F0.6+*+t%29+from+t%3D0+to+6*pi

restart; with(VectorCalculus)

R := 1;







x := proc (t) options operator, arrow; (R-r)*cos(t)+d*cos((R-r)*t/r) end proc:

y := proc (t) options operator, arrow; (R-r)*sin(t)-d*sin((R-r)*t/r) end proc:

plot([x(t), y(t), t = 0 .. VectorCalculus:-`*`(6, Pi)]);


ArcLength(`<,>`(x(t), y(t)), t = 0 .. VectorCalculus:-`*`(6, Pi))



diff(x(t), t);



diff(y(t), t)



sqrt(VectorCalculus:-`+`((-.4*sin(t)-.5333333334*sin(.6666666668*t))^2, (.4*cos(t)-.5333333334*cos(.6666666668*t))^2))






int(((-.4*sin(t)-.5333333334*sin(.6666666668*t))^2+(.4*cos(t)-.5333333334*cos(.6666666668*t))^2)^(1/2), t = 0 .. VectorCalculus:-`*`(6, Pi))



int(((-.4*sin(t)-.5333333334*sin(.6666666668*t))^2+(.4*cos(t)-.5333333334*cos(.6666666668*t))^2)^(1/2), t)

-1.120000000*((0.2133333334e20*cos(.8333333334*t)^2-0.2177777778e20)*(cos(.8333333334*t)^2-1.))^(1/2)*(-1.*cos(.8333333334*t)^2+1.)^(1/2)*EllipticE(cos(.8333333334*t), .9897433186)/((0.2133333334e20*cos(.8333333334*t)^4-0.4311111112e20*cos(.8333333334*t)^2+0.2177777778e20)^(1/2)*sin(.8333333334*t))


evalf(VectorCalculus:-`+`(limit(-1.120000000*((0.2133333334e20*cos(.8333333334*t)^2-0.2177777778e20)*(cos(.8333333334*t)^2-1.))^(1/2)*(-1.*cos(.8333333334*t)^2+1.)^(1/2)*EllipticE(cos(.8333333334*t), .9897433186)/((0.2133333334e20*cos(.8333333334*t)^4-0.4311111112e20*cos(.8333333334*t)^2+0.2177777778e20)^(1/2)*sin(.8333333334*t)), t = VectorCalculus:-`*`(6, Pi)), VectorCalculus:-`-`(limit(-1.120000000*((0.2133333334e20*cos(.8333333334*t)^2-0.2177777778e20)*(cos(.8333333334*t)^2-1.))^(1/2)*(-1.*cos(.8333333334*t)^2+1.)^(1/2)*EllipticE(cos(.8333333334*t), .9897433186)/((0.2133333334e20*cos(.8333333334*t)^4-0.4311111112e20*cos(.8333333334*t)^2+0.2177777778e20)^(1/2)*sin(.8333333334*t)), t = 0))))



simplify(diff(-1.120000000*((0.2133333334e20*cos(.8333333334*t)^2-0.2177777778e20)*(cos(.8333333334*t)^2-1.))^(1/2)*(-1.*cos(.8333333334*t)^2+1.)^(1/2)*EllipticE(cos(.8333333334*t), .9897433186)/((0.2133333334e20*cos(.8333333334*t)^4-0.4311111112e20*cos(.8333333334*t)^2+0.2177777778e20)^(1/2)*sin(.8333333334*t)), t))





Try solve 

restart; with(PDEtools);
U := diff_table(u(x, y, z));

pde[1] := x*y*U[z]+x*U[x]+2*y*U[y] = 0;

bc[1] := eval(U[], z = 0) = x^2+y^2;
sys[1] := [pde[1], bc[1]];

Maple nothing returned. Where my mistake ?? Thank you.

My code :

> restart; with*PDEtools;

> PDE := diff(u(x, t), `$`(t, 2)) = 4*(diff(u(x, t), `$`(x, 2)));

> pdsolve({PDE, u(x, 0) = cos((1/2)*x), (D[1](u))(x, 0) = 0}, u(x, t));

And i get Error, (in pdsolve/BC) invalid input: indets expects 1 or 2 arguments, but received 3.Please help me find my Error.Thank you!!!

The following procedure is intended to recursively generate all vectors in the set of n dimension vectors with elements 0 to p-1. If I use a fixed value for p it works fine, but as soon as I introduced p as an argument it gives the error "Error, (in F) invalid input: F uses a 2nd argument, n, which is missing".

  if n=1 then:
    return [seq(Vector([x]),x=0..(p-1))];
    return [ seq(seq(Vector([v[],xn]),v in F(n-1)),xn=0..(p-1)) ];
  end if:
end proc:


I cannot for the life of me figure out what is wrong with the above code? Can anyone enlighten me?

Thanks in advance for your help.

I didn't even know the erf function existed until doing this problem. I looked up how to use it, so I tried plugging in the explicity form into Maple, hoping it'd solve it, but it just spit back out the erf function.

I am trying to get a number answer.  A decimal. Because this is calculating a probability. How do I get Maple to give me a number here? Thanks!

Sometimes I got an error (purple in output). How can I catch on programming level?

I mean I want to do smth like: if <error> -> then <action>

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/ .

Hello, Maple is giving me the error:

"Error, (in simplify/table) too many levels of recursion"

Once I take the integral of an expression I am getting the error. It starts at the first integral of the document. 

Note: If I make another maple worksheet and write the expression of the integral without writing it shorthand by substituting the functions in it seems to give me an answer. 

For example instead of the integral of say, y(x)*f(x) I would write out the definitions of the functions in the integral and it would give me an answer while the former would give me the error. 

I have uploaded the document, Any help would be appreciated. I'm not sure if there is a fix or not. Thanks


I tried to define the Poisson bracket in this way

local P;

The problem is that, if I ask Ps(P[1],X) I got 0 which is clearly wrong.

Where is the error?

Thanks Nicola 

I have tried to solve the following ode equation, but I have got error. What is the potencial problem?




When I use the Determinant function on a matrix with (single variable) polynomial entries with real coefficients I often get an incorrect answer. I know the answers are incorrect because they have a higher degree or a lower lowest degree than is possible given the matrix elements.

However, when I replace the coefficients in the polynomials with rational numbers or I put in the option method=minor, I get the correct answer.

The problem seems to be roundoff error. However, the important error is not simply small changes in the resulting polynomial. The important error is the presence of entirely incorrect powers of the variable and not with very small coefficients.

How does this happen and why does the help page for Determinant( ) not warn of this behavior? In particuiar, why does the help page not say that using Gaussian elimination (i.e., the default) will often give incorrect answers in such cases, but using method=minor will work? Is this behavior known? I cannot find any reference to it on the internet.


In Maple V, Release 4 (1996):



for i from i to N  

for i from i to N  

I receive this output:

N := 5000
Error, too many levels of recursion

Can You explain this occurence, as well as the following one:

In Maple V, Release 4 (1996):



for i from i to N  
for i from i to N  


N := 5000
Error, too many levels of recursion
Error, too many levels of recursion

How does one control allowance for recursion depth?

HI there,


I have the following problem: I want to improve the runtime of my script (Maple 2016) and want to use multithreading/tasking.

First I have this script (let's start with an easy example):

  with(RealDomain): #I know, I don't need all of that here

>cdf := x-> int(PDF(GammaDistribution(4.5/100,2.5),xi-0.068),xi=0.068..x):
>N:= 20:
>sample := (i) -> solve( (1/(2*(N+1))+1/(N+1)*i)=cdf(x),x): #this is an equidistant sampling

> smpl := [Seq(sample(i),i=1..(N-1))]; #I try to run a multithread seq -> got it from the documentation

   Error, (in assuming) when calling 'Engine:-Process'. Received: 'type `System` does not exist'

I get this error message, but I don't really know what to do with it. I googled and searched, but I couldn't find useful help. Note that when I run this command, I still use only one processor (at least until it returns the error). I also tried:

>smpl := Map(sample,sample_dists);>N:= 20:
   Error, (in assuming) when calling 'Engine:-Process'. Received: 'type `System` does not exist'

I also tried to implement it with threads:

> cont := proc()
      global mutex_sample, smpl:
      smpl := [op(smpl), _passed]: #add the results of the tasks to the smpl var.
      print("Sampling Done");
   end proc:

> sample := proc(cdf, min, max, N) #samle the region
      local output:
      seq(solve(,x),i=0..(N-1)); #return value
   end proc:

> startSampling := proc()
      local sampling_tasks,i:

      print("Starting Sampling!");
      sampling_tasks := []:
      for i from 1 to kernelopts(numcpus) do #for each processor
          sampling_tasks := [op(sampling_tasks), Task=[sample, cdf, i/(kernelopts(numcpus)+1),(i+1)/(kernelopts(numcpus)+1),ceil(N/kernelopts(numcpus))]]; #sample a region
      end do:

      print("Starting Sampling Tasks!");
      Threads:-Task:-Continue( cont, op(sampling_tasks)); #start sampling threads
      print("Sampling Tasks started!");
   end proc:

> Threads:-Task:-Start( startSampling ); #start everything

"Starting Sampling!"
"Starting Sampling Tasks!"
"Sampling Tasks started!"
Error, (in assuming) when calling 'Engine:-Process'. Received: 'type `System` does not exist'

 I know I'm doing here something systematically wrong, but I can't figure it out.

I would be very greatful, for your help or insiged.  


1) The presented script might doesn't make sense (or might be pointless), because I have a much larger and more complex (model) in my original script. But, my script didn't work (exactly same error). So, I tried this simple example, to figure out what the problem is. But it didn't work either. I thought, it might be better (didactically) to find the problem in the simple code. It might be easier to explain in a forum and easier to analyse. (SO I could then see why my more complex code is not working).

2) I was running the script in Linux (Ubuntu 16.04 x64) and it produced this error. I also run the script in Windows 10.2 where I got the same error (and sometimes I got an "Maple Kernel cannot be reached" message where I had to restart Maple.

3) I noticed that solve sometimes returns a complex solution (usually it returned: "value + 0.0 I"). I therefore added "with(RealDomain): ", which had the consequence that some sample points were "NULL". I know that, and that is another issue, which I'm not bothered about (right now).

SOLUTION: (most likely)
Thanks to everyone who replied. But Carl_Love probably is right by pointing out that int, solve, fsolve ... are not thread-safe and therefore caused the crahses/error messages, while calling thesefunctions in different threads.

Code & result:

> map((a::uneval,b)->'args',[a,b,c,d],1..4,x);       
['a, 1 .. 4, x', 'b, 1 .. 4, x', 'c, 1 .. 4, x', 'd, 1 .. 4, x']

> map((a,b::uneval)->'args',[a,b,c,d],1..4,x);           
[a, 1 .. 4, x, b, 1 .. 4, x, c, 1 .. 4, x, d, 1 .. 4, x]

Why is the output not:
['a', 1 .. 4, x, 'b', 1 .. 4, x, 'c', 1 .. 4, x, 'd', 1 .. 4, x]
[a, '1 .. 4', x, b, '1 .. 4', x, c, '1 .. 4', x, d, '1 .. 4', x]

Two weeks ago i didn`t have problem with calculate and plot this pareto`s frontier. I got plot it, but if i try it now, i can´t . Why?.


f1 := (1+x1^2+4/3*(x2^2+1))/(x1+x2); f2 := (1+x1^2+3/4*(x2^2+1))/(x1+x2);

with(plots); with(Optimization); ind := 1; ans := Array(); for i from 1.73205080756887853 by 0.1e-4 while i < 2.87500000000000000 do roll := i; f1max := NLPSolve(f1, {f2 = i}, x1 = 0 .. 2, x2 = 0 .. 3, method = sqp, maximize = false); ans := proc (ind) options operator, arrow; [op([1], f1max), roll] end proc; ind := ind+1 end do; ans;


st := time[real]();


               Array(%id = 18446746983952876598)

pointplot(convert(ans, list));


with(plots); with(Optimization); ind := 1; ans := Array(); for i from 1.73205080756887853 by 0.1e-4 while i < 2.87500000000000000 do roll := i; f1max := NLPSolve(f1, {f2 = i}, x1 = 0 .. 2, x2 = 0 .. 3, method = sqp, maximize = false); ans := proc (ind) options operator, arrow; [op([1], f1max), roll] end proc; ind := ind+1 end do; ans;

st := time[real]();

pointplot(convert(ans, list));
Error, (in plots:-pointplot) number of elements in list must be a multiple of 2  (????)


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