MaplePrimes Questions

pellsolve := proc (D::posint) local P, Q, a, A, B, i; if type(sqrt(D), integer) then error "D must be a nonsquare integer" end if; P := 0; Q := 1; a := floor(sqrt(D)); A := 1, a; B := 0, 1; for i do P := a*Q-P; Q := (D-P^2)/Q; a := floor((P+sqrt(D))/Q); A := A[2], a*A[2]+A[1]; B := B[2], a*B[2]+B[1]; if Q = 1 and `mod`(i, 2) = 0 then break end if end do; return A[1], B[1] end proc;
                            962, 93
isolve(x^2-107*y = 13);
       /                             2             \   
      { x = 21 - 107 _Z1, y = 107 _Z1  - 42 _Z1 + 4 }, 
       \                                           /   

         /                             2               \ 
        { x = 86 - 107 _Z1, y = 107 _Z1  - 172 _Z1 + 69 }
         \                                             / 
genpellsolve := proc (D::posint, N::integer) local t, u, L1, L2, sols, x, y; if type(sqrt(D), integer) then error "D must be a nonsquare integer" end if; t, u := pellsolve(D); if 0 < N then L1 := 0; L2 := floor(sqrt((1/2)*N*(t-1)/D)) elif N < 0 then L1 := ceil(sqrt(-N/D)); L2 := floor(sqrt(-(1/2)*N*(t+1)/D)) else return {[0, 0]} end if; sols := {}; for y from L1 to L2 do x := sqrt(N+D*y^2); if type(x, integer) then sols := sols union {[x, y]}; if `mod`(x^2+D*y^2, N) <> 0 or `mod`(2*x*y, N) <> 0 then sols := sols union {[-x, y]} end if end if end do; DEBUG(); return sols end proc;

Debug inefficace

I have converted a single large worksheet into a workbook comprising many worksheets.  One of the worksheets contains start-up code.  Is that start-up code (which includes numerous subroutines/functions) automatically available/accessible/executable by all the other worksheets in the workbook?  




Is there any formula in maple to find simplex multipliers vector?

Thank you

I have this animation that displays a particle's position after reflection from a shock (the blue plane). I want to add a line that shows the particle coming in and reflecting and have them animate sequentially, but I cannot figure out how. The line should travel along the b axis, but offset in the xi axis to end where the helix begins. Here is the code for the helix animation:


restart; with(VectorCalculus); with(Student[LinearAlgebra]); with(plots);
v[i] := 145000; thetabn := (1/8)*Pi; thetavn := (1/6)*Pi; k := 10; omegac := .5;
v[b] := cos(2*thetabn)/cos(thetabn); v[g] := sin(2*thetabn)/cos(thetabn);
n := `<,>`(k*cos(thetabn), k*sin(thetabn), 0);
[v[b]*t, v[g]*sin(omegac*t)/omegac, v[g]*cos(omegac*t)/omegac];

lambda := v[i]*cos(thetavn)/cos(thetabn);
shockplot := PlanePlot(n, caption = "", planeoptions = [colour = blue, transparency = .5], normaloptions = [shape = cylindrical_arrow, colour = red]);

t1 := textplot3d([k*cos(thetabn), k*sin(thetabn), 0, 'n'], align = above);

display(plots[animate](plot3d, [[v[b]*t, v[g]*sin(omegac*t)/omegac, v[g]*cos(omegac*t)/omegac], t = 0 .. x], x = 0 .. 6*Pi, axes = normal, colour = red, labels = ["b", zeta, xi], thickness = 2, paraminfo = false), shockplot, t1, scaling = constrained, tickmarks = [0, 0, 0]);


The Question: 

'Produce a list of the primes p between 2000 and 3000 for which both 2 and 3 generate Fpx ' 

I have my code for producing the list of primes between 2000 and 3000:

while p<=3000 do
end do:

I also have  code for finding the order of a number in Fpx

 local gpwr, i;
for i from 1 to p-1 do
  gpwr:=gpwr*g mod p; 
if (gpwr = 1) then:
return i;
end if:
end do:
end proc:


but I don't know how to relate them or how to create the overall code - any advice would be very helpful!!

how to solve ((√1 + y′ ² )/dy')

Hello pdsolve experts:  

Using Maple 2018.2.1 and Physics 292 on windows 10.

pde := diff(w(x,y),x)+ (arccot(x)^n *y^2 + y-  arccot(x)^n )*diff(w(x,y),y) = 0;

When I try


It does not generate error.

Should pdsolve have generated this error message instead of returning no solution?


I found that when lambda2 take a small value this integration cannot be evaluated by maple is there any command to solve this problem 


lambda1 := 0.733e-1; lambda2 := 5.3344; alpha := 4.8492

X[6] := evalf(int((Z^(lambda2/lambda1))^2*ln(Z)^2/((Z-1+alpha)^2*(Z^(lambda2/lambda1)-1+alpha)^3), Z = 1 .. infinity, numeric));





Good day everyone,

I have a problem building the code attached below. The series is not substituting F[0](eta) and T[0](eta). 

Please, anyone with useful information should contact.


i have a problem to solve this system ?

The program was written in 2004 with maple 6. Now i'am working by maple 18. And i did'nt launch the program.

Thank you for your interest in advance.

Hi everybody:
I have 12 equations with 12 unknowns(c(1),c(2),...,c(12) and omega), I want to obtain c(1),c(2),...,c(12) and omega, how can I do it? The Maple file( is attached.
with regards...

Hello my friends

I want to solve first order non-linear differential equation by maple 2018 but it does not give me the explicit form for a(t) as the function of time t.

this is my equation where z,k,c, and w are non zero constants 

3*a(t)-a(t)^2-3*z*(diff(a(t), t))^2+k*c*a(t)+w/a(t) = 0

please guide me.

with the best regard


I would like to designate AU as currency for my application, rather than the USD.

I can do it to a degree, but when I use combine I have problems. Compare output 8 and 9 to 17 and 18. help?

I'm presently interested in PDE and I have just discovered the impressive work Nasser Abbasi,has done, and keeps doing, concerning the solution of PDE benchmarks with Maple and Mathematica.

It seems that the result Maple returns for the test case below is not the general solution.

  • 4.19 first order PDE of three unknowns
    problem number 19
    (from example 3.5.4, p 212, nonlinear ode’s by Lokenath Debnath, 3rd edition)

It is rather simple to see that any spherical function u(x, y, z) =f(x^2+y^2+z^2) is a solution of the PDE.
Then any function of the form u(x, y, z) = f(x^2+y^2+z^2) * exp(x+y+z) *C1 (C1 being any constant) is also a solution.
Maple returns only the solution u(x, y, z) = exp(C2*(x^2+y^2+z^2)) * exp(x+y+z) * C1



u := (x, y, z) -> f(x^2+y^2+z^2)

proc (x, y, z) options operator, arrow; f(x^2+y^2+z^2) end proc


expr := (y-z)*diff(u(x, y, z), x)+(z-x)*diff(u(x, y, z), y)+(x-y)*diff(u(x, y, z), z)






u := (x, y, z) -> C*f(x^2+y^2+z^2)*exp(x+y+z)

proc (x, y, z) options operator, arrow; C*f(x^2+y^2+z^2)*exp(x+y+z) end proc


expr := (y-z)*diff(u(x, y, z), x)+(z-x)*diff(u(x, y, z), y)+(x-y)*diff(u(x, y, z), z)






pdsolve((y-z)*diff(U(x, y, z), x)+(z-x)*diff(U(x, y, z), y)+(x-y)*diff(U(x, y, z), z)=0, U(x,y,z),'build')

U(x, y, z) = exp((1/2)*x^2*_C2)*exp(_C1*x)*exp((1/2)*y^2*_C2)*exp(_C1*y)*_C3*_C5*_C4*exp((1/2)*z^2*_C2)*exp(_C1*z)


combine(rhs(%), exp)






First 576 577 578 579 580 581 582 Last Page 578 of 2279