GPY

80 Reputation

5 Badges

9 years, 284 days

MaplePrimes Activity


These are questions asked by GPY

I need to find where the limit of the function:

{1-cos(x*y^3)}/(x^2+y^6)^(1+a) exists/does not exists for different values of a, given 0<=a<=1 and as (x,y)->(0,0).

I've tried writing a procedure that changes a in particular increments but that is clearly not the most efficient way. Are there any rules of limits that I should be using?

 

I've got a set

E:={(x,y,z): x^2+y^2=-2*z-x, z^2+y^2=1} and need to find points of E which have minimal or maximal distance from (0,0,0). I've set up the Lagrangian as F:=sqrt(x^2+y^2+z^2) + L1(x^2+y^2+2z+x)+L2(z^2+y^2-1)

and consequently obtained the equations:

x/sqrt(x^2+y^2+z^2) + 2*x*L1+L1=0

y/sqrt(x^2+y^2+z^2) + 2*y*L1+2*y*L2=0

z/sqrt(x^2+y^2+z^2)+2*L1+2*L2*z=0

for which I've set up
eqn1,eqn2,eqn3 as the three equations and vars:=x,y,z

and used solve() but I'm not getting the right answer( I need to first express x,y,z in terms of L1, L2 and then get values for L1 and L2 by substituting in the constraints and eventually get values of x,y,z.)

How should I implement that?

I have the following construct:
for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0  and if(modp(cubeprod,2)<>0 then
cubesum(cubeprod);// I need both if statements to be true in order to invoke cubesum(). I've noticed that using an and between both if statements is incorrect but :

for i from 1 to 10 do
cubeprod:=i^3;
if irem(cubeprod,3)=0 then 
 if modp(cubeprod,2)<>0 then cubesum(cubeprod) fi;
end if;
end do;

gives me an error as well. What is the right syntax to achieve this?

I have the following procedure to do the above. It works but it returns [9,10],[10,9],[12,1] for n=1729(for example). How do I modify this to 

a) to count 9,10 and 10,9 as the same and hence only show one of them

b) get 1,12 to show as a solution?

cubesum:=proc(n::nonnegint)
global listcub:=table();
local k:=0, x:=iroot(iquo(n,3),3),y:=x,x3:=x^3,y3:=y^3;
if 3*x3 <> n then x=x+1; x3:=x^3;y:=x;y3:=x3 end if;
while x3<=n do
y:=iroot(n-x3,3); y3:=y^3;
if(x3+y3 = n) then k:=k+1; listcub[k]:=[x,y]end if;
x:=x+1; x3:=x^3;
end do;
convert(listcub,list);
end proc:

 

I currently have a function quadsum(n) that determines the [x,y] solutions of the above equation for an integer n. :

quadsum:= proc(n::nonnegint)
local
k:= 0, mylist:= table(),
x:= isqrt(iquo(n,2)), y:= x, x2:= x^2, y2:= y^2;
if 2*x2 <> n then x:= x+1; x2:= x2+2*x-1; y:= x; y2:= x2; end if;
while x2 <= n do
y:= isqrt(n-x2); y2:= y^2;
if x2+y2 = n then k:= k+1; mylist[k]:= [x,y] end if;
x:= x+1; x2:= x2+2*x-1;
end do;
convert(mylist, list)
end proc:

How would I alter this so that I get [x,y] for n= (5^a).(13^b).(17^c)(29^d) for non-negative integers a,b,c,d?

1 2 3 4 5 6 7 Page 3 of 9