115 Reputation

6 Badges

9 years, 145 days

MaplePrimes Activity

These are questions asked by Age


I'm solving a 2D grid with some finite-diference methods. The result is a surface, i.e f(x,y) = z. Where X and Y and points on a grid. 


I then need to integrate over this grid, i.e

int(f(x,y),[x=0..10, y=0..10]) 

I have tried interpolating the grid. I've used CurveFitting:-ArrayInterpolation() to interpolate points in this 2D space and then integrate over them. 

I'm using a 30x30 grid, but this interpolation scheme takes far too long. The function generated from the ArrayInterpolation creates an interpolation every time a point is evaluated, which I assume is why the integral is very computationally expensive. 

I would like to create a piecewise analytic function from the 2-D grid, perhaps using CurveFitting:-Spline(), however from my understanding this only works for 1D objects? 

Is there any better solution for integrating a 2D numeric grid?

Thanks in advance

Hi All, 

I'm using the Physics package, which enables GR calculations, ie defining metrics and tensor algebra. 

Was just curious if it were possible to add a perturbation to the metric when calculating Ricci and Christoffels. 

I would like something like 

g_[] = g1_[mu,nu] + h[mu,nu] 

And then do a calculation like, 



I know this would be possible if I define everything and re-write the calculations for calculating Ricci, i.e

Define(g1[mu,nu], h[mu,nu]); 

and the proceed with GR calculations to find Ricci, however was hoping there was an easier way to do this. 

Any help is appreciated. 

Thanks guys. 

Hi All, 


I'm trying to numerically solve a differential equation which has a numeric function in it. 

For example, consider the function f. 

f:=(r)-> evalf(Int( <some messy function>, <some range>)) ;  <- This can be solved numerically and returns an answer quickly. i.e

f(23) gives 102;


Now, I want to numericaly solve something like.

Eq:= diff(p(r),r,r) + diff(p(r),r) - f(p(r));

ICS:=D(p)(0.001)=0, p(0.001) = 3


dsolve will not attempt to solve it due to the numeric integration in f. Is there a way I can just use numeric techniques to solve this kind of problem?

Thanks in advance.  

Hi Guys, 

I'm trying to find stationary points of a numeric function. Any help would be appreciated. 

Assume I have a numeric function g(x). I'm attempting the following:

deriv:=(x)->fdiff(g(t),t=x); (I can't use the D operator as it doesn't like g(x))

Now deriv(x) <- Can be computed and computes the value quickly and easily. However plot and other functions require algebraic functions. I can plot this (with difficulty) via the following

plot(deriv,-10..10) <- This avoids converting to algebraic function and runs as a procedure. 

I can't use convert(deriv,algebraic) as it fails. 

I want to use the Student[NumericalAnalysis]Roots command, but it requires an algebraic function and I can't use the procedure trick which I did in the plot command. 

Does anyone know a better way of doing this? or is there a way I can write the numerical differivative as an algebraic function. (I've tried fsolve <- But this guy doesn't give me the correct answers generally). 

Thanks guys. 




Hi Edgardo/Others, 

I'm not sure if any more development work is being done on the physics package or not. But I've gotten back to playing around with the great tetrad package you've developed. 

Specfically, I'm calculating spin connections for various metrics. I've run into a few troubles, and have written a simple example showing some calculations that don't match my expectations. 

This is by no means urgent, and if you are no longer developing the package, you can ignore this post. 

Hopefully you can follow the code, I've commented on the issues I have, summary:

1. Checking the tetrads match the minkowski metric when contracted with the curved metric. 

2. I build a tensor Gamma_mu (represents spin connection for a covariant derivative) which contains non-commuting gamma matricies (ideally dirac gamma's). I then try and contract this tensor with another non commutating tensor (dirac gamma matrix) using SumOverRepeatedIndices(). Unless I'm mistaken, this function doesn't preserve the anticommuting nature of the tensor components. 


1 2 Page 1 of 2