MaplePrimes Questions

Search Questions:

Hi community, How to separate the positive root from an expression..

Using maple, approximate integral of 2/(x^2-4) from 0 to .30 by using

(a) the Trapezoidal rule: n=1, h=(b-a)/n, inegral of f(x) from a to b=(h/2)(f(x0)+f(x1))

(b) Simpson’s rule:

(c) the Midpoint rule: 


I try to build a point, but a problem assigning the f function blocks me

Ideas? Thanks

Please help in finding roots of an equation and how can we verify the obtained roots?


Let's consider a PDE as follows:

I want to apply the following transformation to the PDE:



and then decomposing the imaginary and real parts, we get the followings:

How to accomplish this by Maple?


PDE:=I* diff(q(x,t),t)+a*diff(q(x,t),x$2)+b*diff(q(x,t),x,t)+c*q(x,t)^3+lambda*q(x,t)*(Diff(abs(q(x,t)),x$2)/abs(q(x,t)))=I*delta*diff(q(x,t),x);

tr:={x=solve(xi=x-v*tau,x)  ,t=tau,q(x,t)=psi(xi)*exp(I*(-kappa*solve(xi=x-v*tau,x)+omega*tau+theta) )};
ODE:=dchange(tr, PDE, [xi, tau, psi]);


As you can see in the code, I am trying to print the solution of the ODE using the Homotopy perturbation method for N = 10 ( f[0] till f[10]), but Maple is only printing f[0],f[1], and the rest of the terms are not printed out, what could cause this issue to take place?

N := 10:
  F(Y) :=  add(p^i*f[i](Y), i = 0..N);
  HPMEq := (1 - p)*diff(F(Y), Y $ 4) + p*(diff(F(Y), Y $ 4) + R*(diff(F(Y), Y $ 3)*F(Y)- diff(F(Y), Y $ 2)*diff(F(Y), Y $ 1))-G*diff(F(Y), Y $ 2));
  for i from 0 to N do
      sol:= [ sol[],
              ( [ eval
                  ( coeff(HPMEq, p, i) = 0,
                  f[i](0) = -a,
                  f[i](1) = -b,
                  D(f[i])(0) = B * D(D(f[i]))(0),
                  D(f[i])(1) = -B * D(D(f[i]))(1)
end do:

Please kindly try to run this code in your Maple version and tell me if all terms are printed.

 Could you please help me to resolve my problem?

Let us consider A=[a,-b,c, d, -a,b, -d]. Is there any command or function to remove negative element from A? For this example I want to obtain [a,b,c,d]. It is worth noting that not different "a" belong in the output list or "-a".

Thank you in advance.


Dear all

I would like to obtain an equivalent to this integral when n goes to infinity 

int( ((1-t^2)^n, t=0..1)

Many thanks

download the file



Let's consider nonlinear partial differential equations as follows:

It can be reduced into the nonlinear ordinary differential equation

by using the transformation as follows:

How to write a code for transforming the PDE to ODE by Maple?

For example; let's consider the following PDE

by using the transformation above we get the following ODE. 


tr1:={x=mu*t + xi,u(x,t)=U(xi) };
PDE := diff(u(x,t),t) +p*u(x,t)*diff(u(x,t),x) +q* diff(u(x,t),x$3)=0;


How I can obtain system (21) in the following pdf file?
In the first step several changes of variables are done to obtain the system (20),
then changes the variables again repeated in the neighborhood (w1 *, w2 *) to gain Eq 21.
I have 3 questuin:
1-The change of variables performed in the neighborhood (w1 *, w2 *)
for system (20) or for system (7) ???
2-What does it mean in the neighborhood (w1 *, w2 *)?
3- How did obtaun Eq (21)?

[upload link replaced by moderator, as violation of Term of Use]


Could you please help me at the solution of my problem?

Let us consider the following list:

A := [x[1, 1]*(a*x[1, 1] + E[1, 1]) + x[2, 1]*(a*x[1, 2] + E[1, 2]) + x[3, 1]*(a*x[1, 3] + E[1, 3]), x[1, 2]*(a*x[1, 1] + E[1, 1]) + x[2, 2]*(a*x[1, 2] + E[1, 2]) + x[3, 2]*(a*x[1, 3] + E[1, 3]), x[1, 3]*(a*x[1, 1] + E[1, 1]) + x[2, 3]*(a*x[1, 2] + E[1, 2]) + x[3, 3]*(a*x[1, 3] + E[1, 3]), x[1, 1]*(a*x[2, 1] + E[2, 1]) + x[2, 1]*(a*x[2, 2] + E[2, 2]) + x[3, 1]*(a*x[2, 3] + E[2, 3]), x[1, 2]*(a*x[2, 1] + E[2, 1]) + x[2, 2]*(a*x[2, 2] + E[2, 2]) + x[3, 2]*(a*x[2, 3] + E[2, 3]), x[1, 3]*(a*x[2, 1] + E[2, 1]) + x[2, 3]*(a*x[2, 2] + E[2, 2]) + x[3, 3]*(a*x[2, 3] + E[2, 3]), x[1, 1]*(a*x[3, 1] + E[3, 1]) + x[2, 1]*(a*x[3, 2] + E[3, 2]) + x[3, 1]*(a*x[3, 3] + E[3, 3]), x[1, 2]*(a*x[3, 1] + E[3, 1]) + x[2, 2]*(a*x[3, 2] + E[3, 2]) + x[3, 2]*(a*x[3, 3] + E[3, 3]), x[1, 3]*(a*x[3, 1] + E[3, 1]) + x[2, 3]*(a*x[3, 2] + E[3, 2]) + x[3, 3]*(a*x[3, 3] + E[3, 3])]

I want to subs E[k,k]=1 when there is "a*x[k,k]+E[k,k]" as a part of polynomial in the above list.

Thank you so much in advance

In the following, after equation (15), I would like to use the clickable functionality to obtain the equations A, B, C, and D. I had to manually use copy-paste to obtain those equations. Because when I used the equation manipulator to square both sides, it started to be a mess.  After that, I was able to continue for (16) and the rest to obtain finally the speed of the muon neutrino.

P.S. If you see something wrong in the calculation, I am always interested to correct them.

Thank you in advance.


I was able to get Procedure 2 to work using a for - do loop. I was wondering if it is possible to speed up the calculation by using map to find the number of roots? I do not fully understand map and passing data.

tgf := proc(a, b, c, d, t, m, n)

          local X;

          X := [solve(abs(a*x + b) + abs(c*x + d) - t*x^2 + m*x - n = 0)]; 

          return nops(X);

end proc;

res := CodeTools:-Usage(map(tgf, L));
Error, (in CodeTools:-Usage) invalid input: tgf uses a 2nd argument, b, which is missing

The L Array is tripping me up, here is a partial display of the array:

Array(1..262, 1..7, [[5,2,3,9,1,1,1],[5,2,3,9,2,1,1],[5,4,3,7,1,1,1],[5,4,3,7,2,1,1],[5,5,3,6,1,1,1],[5,5,3,6,2,1,1],[5,5,4,8,1,1,2],[5,5,4,8,2,1,2], ... ,[10,10,5,10,2,2,2]], datatype = integer[4]).

I made L Array into a list of list, R. Somewhat works.

Here is the script: 

Thanks for any help.

Hi Maple community. How to find the any real root of the complex equation which has been mention in my worksheet.

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