jschulzb

150 Reputation

9 Badges

13 years, 251 days

MaplePrimes Activity


These are questions asked by jschulzb

Hi,

     I have a list of 603 integrals that I want to evaluate. Unfortunately, I can't get Maple to do most of them. Mathematica can do some that Maple can't, and returns an answer in terms of BesselJ functions. So my question is 2-fold

1) Is there a way to make Maple do this integral?
2) If not, is there a way to efficiently convert 603 expessions to Mathematica and back?

 

EXAMPLE INTEGRAL
restart;
assume(k1::real, k2::real, R::real, R>0);
a :=cos(x)*exp(I*(k1*R*sin(x)+k2*R*sin(x)-4*x))*sin(x):
int(a, x=-Pi/2..Pi/2) assuming real;


Thanks! 

restart;

assume(k1::real, k2::real, R::real, R>0);

a :=cos(x)*exp(I*(k1*R*sin(x)+k2*R*sin(x)-4*x))*sin(x)

cos(x)*exp(I*(k1*R*sin(x)+k2*R*sin(x)-4*x))*sin(x)

(1)

int(a, x=-Pi/2..Pi/2) assuming real;

int(cos(x)*exp(I*(k1*R*sin(x)+k2*R*sin(x)-4*x))*sin(x), x = -(1/2)*Pi .. (1/2)*Pi)

(2)

Mathematica Answer

ans := -(1/((k1 + k2)^6*R^6))*2*I*Pi*
(
10*(k1 + k2)^4*Pi*R^4*BesselJ(2, sqrt((k1 + k2)^2*R^2))
+ 2*Pi ((k1 + k2)^2*R^2)^(3/2) (-30 + (k1 + k2)^2*R^2) *BesselJ(3, sqrt((k1 + k2)^2*R^2))
- (k1 + k2)^4*R^4*(-(k1 + k2)*R*cos((k1 + k2)*R) + sin((k1 + k2)*R))
+ 8*(k1 + k2)^2*R^2*(-(k1 + k2)*R*(-6 + (k1 + k2)^2*R^2)*cos((k1 + k2)*R) + 3*(-2 + (k1 + k2)^2*R^2)*sin((k1 + k2)*R))
- 8*(-(k1 + k2)*R*(
120 - 20*k2^2*R^2 + k1^4*R^4 + 4*k1^3*k2*R^4 +

 k2^4*R^4 + 4*k1*k2*R^2*(-10 + k2^2*R^2) +

 k1^2*(-20*R^2 + 6*k2^2*R^4))*cos((k1 + k2)*R) +

 5*(24 - 12*k2^2*R^2 + k1^4*R^4 + 4*k1^3*k2*R^4 + k2^4*R^4 +

 4*k1*k2*R^2*(-6 + k2^2*R^2) +

 6*k1^2*R^2*(-2 + k2^2*R^2))*sin((k1 + k2)*R)
)
);

-(2*I)*Pi*(10*(k1+k2)^4*Pi*R^4*BesselJ(2, (k1+k2)*R)+2*Pi((k1+k2)^2*R^2)^(3/2)*BesselJ(3, (k1+k2)*R)-(k1+k2)^4*R^4*(-(k1+k2)*R*cos((k1+k2)*R)+sin((k1+k2)*R))+8*(k1+k2)^2*R^2*(-(k1+k2)*R*(-6+(k1+k2)^2*R^2)*cos((k1+k2)*R)+3*(-2+(k1+k2)^2*R^2)*sin((k1+k2)*R))+8*(k1+k2)*R*(120-20*R^2*k2^2+k1^4*R^4+4*k1^3*k2*R^4+k2^4*R^4+4*k1*k2*R^2*(R^2*k2^2-10)+k1^2*(6*R^4*k2^2-20*R^2))*cos((k1+k2)*R)-40*(24-12*R^2*k2^2+k1^4*R^4+4*k1^3*k2*R^4+k2^4*R^4+4*k1*k2*R^2*(R^2*k2^2-6)+6*k1^2*R^2*(R^2*k2^2-2))*sin((k1+k2)*R))/((k1+k2)^6*R^6)

(3)

 

 


Download ToughIntegral.mw

Hi, 

     I'm trying to solve this PDE, and Maple 2015 gives me a solution quickly. I can test the solution with pdetest() and this verifies that it works. However, when I try to verify this myself I don't get zero. Is there some trick pdetest() is using to that I am missing? Or is pdetest() wrong in this case?

 

restart;

eq := I*exp(-(2*I)*k*t)*k*sin(theta)*r^2*cos(theta)^3+4*exp(-(2*I)*k*t)*r*cos(theta)^3+2*(diff(Vr(t, r, theta), theta, theta))*cos(theta)*exp(-I*k*(sin(theta)*r+t))-6*(diff(Vr(t, r, theta), theta))*sin(theta)*exp(-I*k*(sin(theta)*r+t))-4*Vr(t, r, theta)*cos(theta)*exp(-I*k*(sin(theta)*r+t))-4*exp(-(2*I)*k*t)*r*cos(theta);

I*exp(-(2*I)*k*t)*k*sin(theta)*r^2*cos(theta)^3+4*exp(-(2*I)*k*t)*r*cos(theta)^3+2*(diff(diff(Vr(t, r, theta), theta), theta))*cos(theta)*exp(-I*k*(sin(theta)*r+t))-6*(diff(Vr(t, r, theta), theta))*sin(theta)*exp(-I*k*(sin(theta)*r+t))-4*Vr(t, r, theta)*cos(theta)*exp(-I*k*(sin(theta)*r+t))-4*exp(-(2*I)*k*t)*r*cos(theta)

(1)

sol := pdsolve(eq);

Vt(t, r, theta) = _F2(t, r)/cos(theta)^2+sin(theta)*_F1(t, r)/cos(theta)^2-((1/2)*I)*(cos(theta)^2*k^2*r^2-2)*exp(I*(sin(theta)*r-t)*k)/(k^3*r^2*cos(theta)^2)

(2)

pdetest(sol, eq);

0

(3)

eq2 := eval(eq, Vr(t,r,theta) = rhs(sol)):
eq2 := simplify(%);

-((1/2)*I)*exp(-(2*I)*k*t)*k*r^2*cos(theta)^3+2*exp(-(2*I)*k*t)*r*sin(theta)*cos(theta)-3*(diff(Vt(t, r, theta), theta))*sin(theta)*exp(-I*k*(sin(theta)*r+t))-2*Vt(t, r, theta)*cos(theta)*exp(-I*k*(sin(theta)*r+t))+(diff(diff(Vt(t, r, theta), theta), theta))*cos(theta)*exp(-I*k*(sin(theta)*r+t))

(4)

evalb(eq2 = 0);

false

(5)

 

 

 

Download PDESolving.mw

Hi, 

     I was just curious about the difference between defining tensors as arrays/matricies/TensorArrays vs defining them as algebraic symbols. I found that defining them as an expression lead to the wrong answer, and I was forced to define a tensor (LKh) as an array. I've attached a worksheet demonstrating my problem.

I apologize for the amount of tensors needed to find this problem, but it is the only one I have reproduced the issue. I basically define the metric
Metric = g_
auxillary tensor = h
Killing vector = K
LieDerivative of h, wrt K = LKh (not a tensor array)
LieDerivative of h, wrt K = LKh2 (tensor array)
Then I compare two expressions, rho1 and rho2 computed from LKh and LKh2 and they disagree. 


MapleQuestion.mw

Thanks!

Hi, 

     I'm computing a simple covariant derivative of a tensor field W[a,b] in 3 spacetime dimensions. Unfortuntly, my result in Maple 2015 is disagreeing with those obtained in GRTensorII. I think this could be a bug in D_.

Looking at the first result, W[r t ; t] = mu/r in GRTensor II  but D_[t] W[r t] = -mu/r*(cos(theta)^2 - 2). Some ones are correct (diagonals), and some are off by a factor of 2. Some are completely off though.

ErrorsInD.mw


Thanks,

Hi,

     I was wondering if there is an easy way to define another set of indices in the Physics package. For example, usually greek indices are for all 4 spacetime dimensions. Using Setup(spaceindices = lowercaselatin), we can define 3 of those as space indices. I was hoping there is a more general command, so that I could use only 2 indices as "space indices". For example, X[i] would run over x,y while X[mu] would run over t, z. Is there such a command in the Physics package, or a simple way to implement this personally?

Second thing. I was playing with SumOverRepeatedIndices on an expression that contained both space indices and spacetime indices. Usually this seems to work, but in my attached example it does not. I tried the same thing with just spacetime indices in Maple 18 (newest Physics update) and it gave the same error.


Any help appreciated,

PhysicsBug.mw

1 2 3 4 5 6 7 Page 1 of 7