Rakshak

80 Reputation

5 Badges

4 years, 52 days

MaplePrimes Activity


These are questions asked by Rakshak

I am looping over a list of functions to calculate various properties of the said functions. some of these calculations take too long. I was wondering if there was a way to skip to the next element of the loop if a calculation takes more than a specific time.

 

``

NULL

U(t, r, theta, phi) = _F1(r, theta, a^2*phi+phi*r^2-a*t)

eq1 := a*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(cos(theta)-1)*(cos(theta)+1)*(r^2+a^2*cos(theta)^2)^2*(diff(U(t, r, theta, phi), t, t))-a*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(cos(theta)-1)*(cos(theta)+1)*(r^2+a^2*cos(theta)^2)*(diff(U(t, r, theta, phi), theta, theta))-(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(r^2+a^2*cos(theta)^2)^2*(diff(U(t, r, theta, phi), phi, t))+a*U(t, r, theta, phi)*(cos(theta)-1)*(cos(theta)+1)*(r^2+a^2*cos(theta)^2)*(diff(U(t, r, theta, phi), theta))^2-a*cos(theta)*sin(theta)*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(a^2*cos(theta)^2-2*a^2-r^2)*(diff(U(t, r, theta, phi), theta))-(diff(U(t, r, theta, phi), t))*((a*cos(theta)^2-a)*(diff(U(t, r, theta, phi), t))-(diff(U(t, r, theta, phi), phi)))*U(t, r, theta, phi)*(r^2+a^2*cos(theta)^2)^2

a*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(cos(theta)-1)*(cos(theta)+1)*(r^2+a^2*cos(theta)^2)^2*(diff(diff(U(t, r, theta, phi), t), t))-a*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(cos(theta)-1)*(cos(theta)+1)*(r^2+a^2*cos(theta)^2)*(diff(diff(U(t, r, theta, phi), theta), theta))-(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(r^2+a^2*cos(theta)^2)^2*(diff(diff(U(t, r, theta, phi), phi), t))+a*U(t, r, theta, phi)*(cos(theta)-1)*(cos(theta)+1)*(r^2+a^2*cos(theta)^2)*(diff(U(t, r, theta, phi), theta))^2-a*cos(theta)*sin(theta)*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(a^2*cos(theta)^2-2*a^2-r^2)*(diff(U(t, r, theta, phi), theta))-(diff(U(t, r, theta, phi), t))*((a*cos(theta)^2-a)*(diff(U(t, r, theta, phi), t))-(diff(U(t, r, theta, phi), phi)))*U(t, r, theta, phi)*(r^2+a^2*cos(theta)^2)^2

(1)

eq2 := -a*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(cos(theta)-1)*(cos(theta)+1)*(diff(U(t, r, theta, phi), r, t))+(U(t, r, theta, phi)^2-1)*(diff(U(t, r, theta, phi), phi, r))+(diff(U(t, r, theta, phi), r))*((a*cos(theta)^2-a)*(diff(U(t, r, theta, phi), t))-(diff(U(t, r, theta, phi), phi)))

-a*(U(t, r, theta, phi)-1)*(U(t, r, theta, phi)+1)*(cos(theta)-1)*(cos(theta)+1)*(diff(diff(U(t, r, theta, phi), r), t))+(U(t, r, theta, phi)^2-1)*(diff(diff(U(t, r, theta, phi), phi), r))+(diff(U(t, r, theta, phi), r))*((a*cos(theta)^2-a)*(diff(U(t, r, theta, phi), t))-(diff(U(t, r, theta, phi), phi)))

(2)

NULL

Download probfile.mw

I need to solve a system of coupled partial differential equations. I would like to search for a function of 4 variables but such that two of the variables only appear in a particular combination.

F(theta,r, phi*(a^2+r^2)-at).

Is there a way to enforce this?

eq1 := f(r)*((diff(g(t, phi, r), t))*a^2+(diff(g(t, phi, r), t))*r^2+a*(diff(g(t, phi, r), phi)))/(sqrt(-g(t, phi, r)^2*f(r)^2+1)*sqrt(-(r^2+a^2*cos(theta)^2)*(2*M*r-a^2-r^2)))

f(r)*((diff(g(t, phi, r), t))*a^2+(diff(g(t, phi, r), t))*r^2+a*(diff(g(t, phi, r), phi)))/((-g(t, phi, r)^2*f(r)^2+1)^(1/2)*(-(r^2+a^2*cos(theta)^2)*(2*M*r-a^2-r^2))^(1/2))

(1)

eq2 := (((-a*cos(theta)^2+a)*f(r)^2*g(t, phi, r)^2+a*cos(theta)^2-a)*(diff(g(t, phi, r), phi, t))+(g(t, phi, r)^2*f(r)^2-1)*(diff(g(t, phi, r), phi, phi))+(-(diff(g(t, phi, r), phi))+(diff(g(t, phi, r), t))*a*(cos(theta)-1)*(cos(theta)+1))*(diff(g(t, phi, r), phi))*f(r)^2*g(t, phi, r))*f(r)/((-g(t, phi, r)^2*f(r)^2+1)^(3/2)*sin(theta))

(((-a*cos(theta)^2+a)*f(r)^2*g(t, phi, r)^2+a*cos(theta)^2-a)*(diff(diff(g(t, phi, r), phi), t))+(g(t, phi, r)^2*f(r)^2-1)*(diff(diff(g(t, phi, r), phi), phi))+(-(diff(g(t, phi, r), phi))+(diff(g(t, phi, r), t))*a*(cos(theta)-1)*(cos(theta)+1))*(diff(g(t, phi, r), phi))*f(r)^2*g(t, phi, r))*f(r)/((-g(t, phi, r)^2*f(r)^2+1)^(3/2)*sin(theta))

(2)

pdsolve([eq1, eq2])

Error, (in pdsolve/sys) found the element '_F4' repeated in the indication of blocks variables

 

``

Download problemfile.mw

I am trying to solve these two coupled PDE and am getting this error. Does anyone know what this mean?

I was wondering if there was a way to permute a list to get a list of sums of permutations.
for example,

list:=[a,b,c]
permute(list,2) gives me ([a,b] [b,c] [c,a])

I would like to get this instead: ([a+b],[b+c],[c+d])

I have defined several expressions that keep coming up in my calculations. 
Like :

Delta := -2*M*r+a^2+r^2;
Sigma := (a^2+r^2)^2-Delta*a^2*sin(theta)^2;

Is it possible to make maple recognize these objects whenever they appear in the result of a calculation?

1 2 3 Page 2 of 3