MaplePrimes Questions

I am trying to evaluate the following double integral where hypergeom([x,1/2],[3/2],C) is gauss hypergeometric function 2f1. maple gives back it unevaluated. I doubt it may be due to slow convergence of hypergeometric function. 
 

restart; x := (1/6)*Pi; evalf(int(evalf(int(cos(x)*hypergeom([x, 1/2], [3/2], sin(x)/(r*cos(x)+k-2*r*sin(x))^2)/(r*sin(x)^2+r*cos(x)+k)^4, k = 0 .. 10)), r = 1 .. 2))

Int(Int(.8660254040*hypergeom([.5000000000, .5235987758], [1.500000000], .5000000000/(-.1339745960*r+k)^2)/(1.116025404*r+k)^4, k = 0. .. 10.), r = 1. .. 2.)

(1)

``


 

Download DOUBLE_INT_2.mw

I have tried to compile a simple program looking for counterexamples to a conjecture by Goldbach that every odd number is a sum of a prime and twice a square. Stern gave the counterexamples 5777 and 5993 a long time ago, so this is mainly for instruction purposes.

My program

othergoldbachFCi:=proc(sieve::Array(1..10000,datatype=integer[4]))
   local i,j,M; 
   M:=10000;
   for i from 1 to M do
      if(sieve[i] mod 2=0) then 
         for j from 1 to iquo(M-i,2*i+1) do 
            sieve[i+j*(2*i+1)]:=2*iquo(sieve[i+j*(2*i+1)],2)+1;
         end do; 
         for j from 1 to floor(sqrt(M-i)) do 
            sieve[i+j*j]:=2+sieve[i+j*j] mod 2;  
         end do;
      else 
         if(sieve[i]<2) then 
            printf("%d is a counterexample\n",2*i+1); 
         end if; 
      end if; 
   end do; 
end proc;

works fine and compiles without problems. (I have to pass the array for the sieve because compiled program cannot declare memory, and it has to be 4 bytes even though I only need to use the lower 2 bit).  But the compiled version breaks with

   Error, (in compiledOGi) array index out of bounds

 

already in the first instance of the for loop. After a lot of trial and error I found out that if I replaced the line 

   sieve[i+j*j]:=2+sieve[i+j*j] mod 2;  

by

   temp:=iquo(sieve[i+j*j],2);
   sieve[i+j*j]:=2+(sieve[i+j*j]-2*temp);  

 

then the problem goes away and the compiled version works beautifully. It is not enough to do the mod 2 computation in temp, and not enough to replace mod by iquo in one line. 

This makes very little sense to me. Can anybody explain? I'm still using Maple 2016 and do not know if the issue has been resolved in Maple 2017.

 

Best,

Soren

 

 

The equation
                     -sqrt(k x) = sqrt(k x)
 is solved correctly by Maple:

solve(-sqrt(k*x) = sqrt(k*x));
                 {k = k, x = 0}, {k = 0, x = x}

However, the equation
                 -sqrt(k x) = sqrt(k x + k - 1)
 is apparently not solved correctly:

solve(-sqrt(k*x) = sqrt(k*x+k-1));

                         {k = 1, x = x}
The variable
                               x
 can not be arbitrary since this equation reduces to the former equation
-sqrt(k*x) = sqrt(k*x);
 when  k = 1
.

Maple should return something similar to (4) below.

eval(-sqrt(k*x), k = 1) = eval(sqrt(k*x+k-1), k = 1);
                          (1/2)    (1/2)
                        -x      = x    
solve({-x^(1/2) = x^(1/2)});
                            {x = 0}

Can this be explained in some way, or is this a bug?

Hi everybody,

I am presently developing a MAPLE-based application and I need to trace its evolutions through a “version control process”.
For codes written in other languages I use to use GIT (it acts with text files and it has syntactic coloring for different languages).

I suspect the development teams routinely face this version control issue.
Could you advise me,  on the versioning tools you use ?

Great thanks in advance

Let be the number z so that |z+3-2*I| + |z-3-8*I| = 6*sqrt(2). Find min and max of the modulus of z. How can I find min and max of modulus of z with Maple.

Thank for your help!

right_file.mw

i want to start i from 0 ,1 ,2 , 3 but it does not work I rhink the defaul value is from 1 to 4. can we begin it with zero.

Hi every body,

I have a function "p(v,T)" which I evaluated its critical point. after calculating when I want to plot diagram of "p-v" for some values of "T" around critical value of "T" I expect the shape of diagram for "T" bigger and smaller than critical value of "T" be different. but it not happened. Are here anyone can help me? The function "p(v,T)" is in the file. if you want calculate critical point and check I am right or wrong. Thanks criticalpoint.mw


 

restart

eq := diff(y(t), t, t)+9*y(t) = Dirac(t)

diff(diff(y(t), t), t)+9*y(t) = Dirac(t)

(1)

with(inttrans):

icon := y(0) = 0, (D(y))(0) = 0;

y(0) = 0, (D(y))(0) = 0

(2)

dsolve({eq, icon}, y(t), method = laplace);

y(t) = (1/3)*sin(3*t)

(3)

dsolve({eq, icon}, y(t));

y(t) = (1/3)*(Heaviside(t)-1/2)*sin(3*t)

(4)

``


 

Download Dirac_for_Primes.mw

Hi,

I want to know is maple helpful to find a cjange coordinate to transform an old coordinate to a new coordinate? details are attached to the file:

changecoor.mw

Thanks guyz

Hi everyone,

I have a functional "L" which I want to solve Euler-Lagrange for it and then extermise that functionalexfun.mw by its equation of motions. I know the result must be same to a function like "A" but I cant obtain that. "a", "b" and "s" are constants and not important, I insist more on the shape of "A"

 

Thanks a lot

i am new user in maple .i want to calculate eigenvalues of a symmetrix matrix to find max or min value but i usually face a error code ' (in simpl/max) complex argument to max/min'

i know that a symmetrix matrix have real eigenvalues.

for example:
restart:with(LinearAlgebra):with(GraphTheory):interface(rtablesize=infinity):
SeidelMatrix:=proc(G::Graph) local J,B,A,S;
J:=Matrix(1..NumberOfVertices(G),1..NumberOfVertices(G),shape=constant[1]):
B:=IdentityMatrix(NumberOfVertices(G)):
A:=AdjacencyMatrix(G):
S:=J-B-MatrixScalarMultiply(A,2):
convert(S,Matrix,shape=symmetric,datatype=float):
return S:
end proc:
E:=sort(eval(Eigenvalues(SeidelMatrix(CycleGraph(7)),output='list'))):
(min,max)(E);
Error, (in simpl/min) complex argument to max/min: (1/3)*(-28+(84*I)*3^(1/2))^(1/3)+(28/3)/(-28+(84*I)*3^(1/2))^(1/3)-1/3
 

 

I am trying to evaluate the following summation which gives the result 0. But I think answer is not correct.
 

restart; x := 0; evalf(Sum(Sum(x^(q-p), p = 0 .. q), q = 0 .. 10))

0.

(1)

``


 

Download zero.mw

A lot of efforts I performed to obtained the right results, somehow I remain sucessful but the results are not exactly same as expected. I request you to kindly see at the christoffel symbol. I also sent the right results.

some_mistakes_in_christoffel.mw

you can see the right results in the given below attachment

right_christoffel_symbols.pdf

as you can comprare the results of both file. the obtain crystoffel are not same as the requied.

is it possible to change ODE to PDE?

the ODE has diff(a(t),t) and diff(b(t),t)

how to convert to diff(t, a), diff(t, b) ?

Is there a built-in function in Maple 2015 that identifies and prints prime numbers in a specified integer range?

First 972 973 974 975 976 977 978 Last Page 974 of 2433