MaplePrimes Questions

I want to make the blue output my procedure spits out a another color, and align it to the right, is this even possible? Or something like it?

I basically want to make a Maple procedure that does certain calculations and writes the explanation for each calculation. I do however want Maple to write these explanations as a text field like in a normal Maple worksheet, instead of the blue output in the middle. Is this possible? Or is there any alternative ideas you have that I could try? Would really appreciate any kind of help, thanks.

I have included a transfer function of a 3 degree of freedom system.  There are special loci, aside from s = 0, where the numerator will equate to a REAL scalar value, and the denominator will reduce to a simple product of the individual z roots.  Does anyone know if there is some physical significance, interpretation, or analog to this condition and special loci?


I am using matrices to input data in order to plot it on a surface plot. Is it then possible to export an animation of this graph rotating around an axis?

My matrix is 40 x 3 Matrix


Thanks :)

Hello friends!

I have one question, whenever I solved system of ODEs using numerical solution (bilton command i.e., dsolve(dsys1, numeric, output = listprocedure, range = 0 .. 1)), its accutacy always like 10 or 12 digits not above at all. I want to how i improve the accuracy. I am waiting your postive answer.

HI MaplePrimes,

Is the Goldbach Weak Conjecture proven?

Consider odd primes p, q, and r.  The question is, Is the sum p+q+r sufficient to reach all odd numbers greater than 9?

See -'s_weak_conjecture

I tried an example.






Digits := 18;
f := proc (n) 3*sin(x[n]) end proc;

g := proc (n) 3*cos(x[n])

end proc;

#problem call.
for n from 0 to 0 do

e1 := expand(-y[n+3/2]+y[n]-3*y[n+1/2]+3*y[n+1]+1/11612160*(5856*h^4*g(n+1/2)-19968*h^4*g(n+3/2)+2343*h^4*g(n)-76356*h^4*g(n+1)-7058*h^4*g(n+2)+608864*h^3*f(n+1/2)+104864*h^3*f(n+3/2)+28489*h^3*f(n)+702864*h^3*f(n+1)+6439*h^3*f(n+2)));

e2 := expand(-y[n+2]+3*y[n]-8*y[n+1/2]+6*y[n+1]+1/5806080*(18768*h^4*g(n+1/2)-32880*h^4*g(n+3/2)+3867*h^4*g(n)-76356*h^4*g(n+1)-2229*h^4*g(n+2)+965728*h^3*f(n+1/2)+461728*h^3*f(n+3/2)+45953*h^3*f(n)+1405728*h^3*f(n+1)+23903*h^3*f(n+2)));

e3 := expand(-z[n]+(1/383201280*(-4207440*h^4*g(n+1/2)-930192*h^4*g(n+3/2)+371973*h^4*g(n)-3631932*h^4*g(n+1)-41259*h^4*g(n+2)+16136096*h^3*f(n+1/2)+3866720*h^3*f(n+3/2)+5752543*h^3*f(n)+5810400*h^3*f(n+1)+367681*h^3*f(n+2))+4*y[n+1/2]-3*y[n]+y[n+1])/h);

e4 := expand(-z[n+1/2]+(1/191600640*(376320*h^4*g(n+1/2)+118896*h^4*g(n+3/2)-29469*h^4*g(n)+532764*h^4*g(n+1)+5079*h^4*g(n+2)-5812112*h^3*f(n+1/2)-508016*h^3*f(n+3/2)-381553*h^3*f(n)-1236168*h^3*f(n+1)-45511*h^3*f(n+2))-y[n]+y[n+1])/h);

e5 := expand(-z[n+1]+(1/383201280*(-31920*h^4*g(n+1/2)-433776*h^4*g(n+3/2)+71547*h^4*g(n)-2519748*h^4*g(n+1)-17493*h^4*g(n+2)+18565216*h^3*f(n+1/2)+1933216*h^3*f(n+3/2)+885665*h^3*f(n)+10391328*h^3*f(n+1)+158015*h^3*f(n+2))-5*y[n+1/2]+y[n]+3*y[n+1])/h);

e6 := expand(-z[n+3/2]+(1/95800320*(250224*h^4*g(n+1/2)-730680*h^4*g(n+3/2)+61266*h^4*g(n)-1526256*h^4*g(n+1)-22044*h^4*g(n+2)+15680504*h^3*f(n+1/2)+4712456*h^3*f(n+3/2)+735469*h^3*f(n)+22576428*h^3*f(n+1)+203623*h^3*f(n+2))-8*y[n+1/2]+3*y[n]+5*y[n+1])/h);

e7 := expand(-z[n+2]+(1/383201280*(3873264*h^4*g(n+1/2)+332976*h^4*g(n+3/2)+497649*h^4*g(n)-1407564*h^4*g(n+1)-720255*h^4*g(n+2)+114710816*h^3*f(n+1/2)+93716192*h^3*f(n+3/2)+5705827*h^3*f(n)+191366496*h^3*f(n+1)+9635389*h^3*f(n+2))-12*y[n+1/2]+5*y[n]+7*y[n+1])/h);

e8 := expand(-p[n]+(1/191600640*(13423440*h^4*g(n+1/2)+3068304*h^4*g(n+3/2)-1621317*h^4*g(n)+11615292*h^4*g(n+1)+137451*h^4*g(n+2)-32503712*h^3*f(n+1/2)-12664928*h^3*f(n+3/2)-32539039*h^3*f(n)-16869600*h^3*f(n+1)-1223041*h^3*f(n+2))-8*y[n+1/2]+4*y[n]+4*y[n+1])/h^2);

e9 := expand(-p[n+1/2]+(1/191600640*(-3053856*h^4*g(n+1/2)-213216*h^4*g(n+3/2)+98049*h^4*g(n)-509436*h^4*g(n+1)-10191*h^4*g(n+2)-1045120*h^3*f(n+1/2)+831104*h^3*f(n+3/2)+1331083*h^3*f(n)-1207008*h^3*f(n+1)+89941*h^3*f(n+2))-8*y[n+1/2]+4*y[n]+4*y[n+1])/h^2);

e10 := expand(-p[n+1]+(1/63866880*(194160*h^4*g(n+1/2)-373968*h^4*g(n+3/2)+52329*h^4*g(n)-2514924*h^4*g(n+1)-14727*h^4*g(n+2)+14006304*h^3*f(n+1/2)+1695712*h^3*f(n+3/2)+634955*h^3*f(n)+15463008*h^3*f(n+1)+133461*h^3*f(n+2))-8*y[n+1/2]+4*y[n]+4*y[n+1])/h^2);

e11 := expand(-p[n+3/2]+(1/191600640*(1491168*h^4*g(n+1/2)-4758240*h^4*g(n+3/2)+190977*h^4*g(n)-509436*h^4*g(n+1)-103119*h^4*g(n+2)+46274944*h^3*f(n+1/2)+48151168*h^3*f(n+3/2)+2215307*h^3*f(n)+93985056*h^3*f(n+1)+974165*h^3*f(n+2))-8*y[n+1/2]+4*y[n]+4*y[n+1])/h^2);

e12 := expand(-p[n+2]+(1/191600640*(4772688*h^4*g(n+1/2)+11719056*h^4*g(n+3/2)+338619*h^4*g(n)+11615292*h^4*g(n+1)-1822485*h^4*g(n+2)+59770976*h^3*f(n+1/2)+79609760*h^3*f(n+3/2)+3528289*h^3*f(n)+109647648*h^3*f(n+1)+34844287*h^3*f(n+2))-8*y[n+1/2]+4*y[n]+4*y[n+1])/h^2) end do;
M := {e || (1 .. 12)};

y_init := 1;

z_init := 0;

p_init := -2;

x_init := 0; A := 0; B := 1; N := 40;

h := evalf((B-A)/N); count := 1;

X := y[k], y[k+1/2], y[k+1], y[k+3/2], z[k], z[k+1/2], z[k+1], z[k+3/2], p[k], p[k+1/2], p[k+1], p[k+3/2];

step := seq(eval(x, x = n*h), n = 1 .. N);

y_exact := ([seq])(eval(3*cos(x)+(1/2)*x^2-2, x = n*h), n = 1 .. N);

z_exact := ([seq])(eval((1/3*(3*x^2+6*x+3))/(x^3+3*x^2+3*x+1), x = n*h), n = 1 .. N);

p_exact := ([seq])(eval((1/3*(6*x+6))/(x^3+3*x^2+3*x+1)-(1/3)*(3*x^2+6*x+3)^2/(x^3+3*x^2+3*x+1)^2, x = n*h), n = 1 .. N);
vars := seq(X, k = 1);
printf("\n%4s%13s%15s%15s\n", "@", "y_Num", "y_Exact", "y_Error");

for q to N do

for ix to 4 do

x[ix] := h*ix+x_init end do;

result := eval(`<,>`(vars), fsolve(eval(M, [x[0] = x_init, x[1/2] = x_init, x[3/2] = x_init, y[0] = y_init, y[1/2] = y_init, y[3/2] = y_init, z[0] = z_init, z[1/2] = z_init, z[3/2] = z_init, p[0] = p_init, p[1/2] = p_init, p[3/2] = p_init]), {vars}));

for k to 4 do

printf("%5.2f %14.15f", step[count], result[k]);

printf("%20.15f %10.18G \n", y_exact[count], abs(result[k]-y_exact[count]));

count := count+1;

P := [result[k]]

end do;

x_init := x[ix-1];

y_init := result[4];

z_init := result[8];

p_init := result[12]

end do;


please that is the code i write to solve the problem after using the matrix form to generate the value but is given me error of the form

   @        y_Num        y_Exact        y_Error
Error, invalid input: eval received fsolve({-6398.00004614630940+6400.00000000000000*y[1], -6397.99992849910140+6400.00000000000000*y[1], -6397.99909739580050+6400.00000000000000*y[1], -199.999989717789185+200.000000000000000*y[1], -40.0000000791700798+40.0000000000000000*y[1], -2.99999993737911015+3*y[1], 39.999999768462113+40.0000000000000000*y[1], -p[1]-6399.99961623646730+6400.00000000000000*y[1], -p[2]-6399.99798489466010+6400.00000000000000*y[1], -y[2]-4.99999972458202552+6*y[1], -z[1]-159.999999048856193+120.000000000000000*y[1], -z[2]-279.999973921987948+280.000000000000000*y[1]}, {p[1], p[2], p[3/2], p[5/2], y[1], y[2], y[3/2], y[5/...

I have the following function which came from a collaborator of a collaborator. It computes a generating function for a family of function's we're using.

GF_Generate := proc (n) 
	local summand, i, j;
	summand := U[0]^x[0]*mul(U[i]^y[i], i = 1 .. n)*mul(binomial(x[0]+add(w[j], j = 1 .. i), y[i])*p^y[i]*(1-p)^(x[0]+add(w[j], j = 1 .. i)-y[i])*binomial(x[0]-1+add(w[j], j = 1 .. i), x[0]-1+add(w[j], j = 1 .. i-1))*v[i]^(x[0]+add(w[j], j = 1 .. i-1))*(1-v[i])^w[i], i = 1 .. n);

	for j from n by -1 to 1 do summand := normal(sum(summand, y[j] = 0 .. infinity)) end do;
	for j from n by -1 to 1 do summand := normal(sum(summand, w[j] = 0 .. infinity)) end do;
	sum(summand, x[0] = 0 .. infinity) 
end proc;

For arguments of 2 and 3 it's quick and works fine on Maple18 (tested both GUI and terminal client on OS X), Maple2015 (tested terminal client only on RHEL linux), but generates a "too many levlels of recursion" error in Maple2016 (tested terminal client only on RHEL linux; same server as Maple2015 was tested). It's slow for arguments of 4 and above (45 minutes for n=4 on my mac laptop), so I haven't tested it thoroughly with larger arguments.

Any idea why this code fails in Maple 2016?


Hi Guys,

I will like to know how I can use Maple to plot a line of best fit given some data.

e.g for data like [x = 21.2, 24.7, 20.8, 20.8, 20.3] and [y = 16.6, 19.7,16.4,16.8,16.9].


I want to write a procedure ThirdDer := proc(f,x0,h) which, given the funcion f, the point x0 and the step size h returns the value of f'''(x0). where f'''(x0) = (f(x0 +2h)−2f(x0 +h)+2f(x0 −h)−f(x0 −2h))/2h^3 


I tried splitting f''' up and assigning the 4 different parts as a letter then putting it all together but that didnt work..

Morning all,

I repeatedly solve (command solve) a collection of systems of inequalies. Some of them can have no solution, but I am able to check if a solution has been found or not, and then take some decision about the system in question.

I have placed a few print commands at different critical locations within the loop where those systems are constructed and possibly solved.
Every time solve fails finding a solution it returns me a "no solution found" warning.
In order to keep my printings readable, could it be possible to avoid those warnings ?
Is there some "try & catch" like mechanism to manage warnings ?

Thank you all in advance

I can't understand how to install this package "SADE" in Maple 17. Secondly, I am new to Maple. So Please guide me the process to install this package and how to use it. Thanks!

I'm trying plot  with implicitplot a expresion which involve Lambert W, but the result is very confuse, is it normal? Could i improve the result?, how?. Thank!


I've encountered a very strange issue with Maple.

The result returns differently with solve and fsolve after/before a variable is given a certain value. See attachment.

The result comes from solve (with variable epsilon) returns value of the same variable with imaginary part while the fsolve returns the correct answer.

Now how can I achieve the same result as fsolve via solve?


Maple_Question_Solve_Fsolve.pdf  (exported PDF from Maple)

3 4 5 6 7 8 9 Last Page 5 of 1435