Search results

  1. M

    How to solve an integral with the Inverse error function

    Hi, this is not a homework and my problem is much bigger for me to give full details here. I came across this integral \mathcal{I}(\xi)=\int^{\xi_c}_{\xi}{\rm d}\xi^\prime\exp\left[\sqrt{2}\sigma\,{\rm Erf}^{-1}\left(1-\frac{8\pi}{3}{\xi^\prime}^3\right)\right] where Erf^{-1} is the...
  2. M

    I'm stuck in grad school

    I have a MSc in astrophysics and I'm a last year PhD student. My project is not going anywhere, I haven't published any paper and I'm far from finishing. My advisor is very picky and won't let me publish anything and I'm terrified the last years have been a huge waste of time. What do you think...
  3. M

    Numerical stability of stiff problem

    I have a very complicated stiff system, which can be expressed as: x^{\prime}(t)=A(x,y)-B(x,y) y^{\prime}(t)=C(x,y)-D(x,y) I decided to solve it with the fixed-point iteration method (http://en.wikipedia.org/wiki/Fixed_point_iteration) but I also have to use adaptive time stepping to...
  4. M

    Discretization of the divergence operator

    I work with a grid-based code, this means that all of my quantities are defined on a mesh. I need to compute, for every point of the mesh the divergence of the velocity field. All I have is, for every cell of my mesh, the values of the 3-d velocity in his 26 neighbors. I call neighbors the...
  5. M

    Difficult non-linear differential equation

    Homework Statement I need to solve this differential equation numerically. I hope you can help me, it's not homework! Homework Equations This is the equation to be solved x''=\dfrac{\alpha}{x}-\beta\dfrac{(x'-\gamma x)^2}{x}-\delta x - \dfrac{\varepsilon}{x^2} The Attempt at a...
  6. M

    How to trasform an orthonormal system in two reference frames

    My question is not homework. I feel ashamed of having this doubts but I'm really stuck on this. The problem is I have a reference frame xyz and here I define the COM \vec x{_{cm}} of the system. Now I move the COM reference frame x'y'z': \vec{x'}=\vec{x}-\vec x{_{cm}} In this reference frame I...
  7. M

    How to get Euler angles

    I know this is rather trivial question but it's not homework! I need this as part of a bigger project. What I have to do is rotate my reference frame to another one. I want my new z-axis to be a vector Z=(Z1,Z2,Z3) Following the notation of this wikipage...
  8. M

    Poisson Equation for a Scalar Field

    We all know that for the gravitational field we can write the Poisson Equation: \nabla^2\phi=-4\pi G\rho But I was wondering if, mathematically, we can write the same equation for a scalar field which scale as r^{-2}. Here is the thing. When you deal with gravity, the Poisson equation is...
  9. M

    Fourier Transform of a discrete function

    I have a set of N data points defined over a periodic interval, 0\le x \le 1. I made a discrete fast fourier transform of these data points and I get a discretized function in the Fuorier space. My question is what are the coordinate of these data points in the Fourier space? I mean, in the real...
  10. M

    Component of a vector

    This might be a very stupid question but I can't come up with an answer, I hope you might help. So, I have two vector in a 3D space \vec x and \vec x^\prime. I know that a certain quantity \vec a is defined along the radial direction between the first vector with respect to the second. What are...
  11. M

    Average of a quantity in all directions

    Homework Statement I have to compute the average of A in all directions for a sphere of radius R. For the direction r, A is defined as: A=\int_0^R n(r)dr where n(r) is the density profile of the sphere. The answer should be \langle A\rangle=\frac{4}{3}\left\langle n \right\rangle R 2. The...
  12. M

    Expansion of HII regions

    I'm trying to understand what Eq. 15 of this paper...
  13. M

    Sampling of a gaussian distribution

    I have a 3d data cube. For every point I measure the property A which is a gaussian variable of mean m and variance s and it's also a function of the density d at every point. A(x,y,z)=f(d(x,y,z))e^(-(X-m)^2/(2\sigma^2)) X is a random number. Now let's say I want to sample the...
  14. M

    Difficult units conversion

    Homework Statement I need to infer the observed star formation efficiency of the Kennicutt Schimdt law starting from a volumetric SF law. The KS law is a relationship between gas and stellar surface density that we can approximate as: \frac{d\Sigma_*}{dt}=A\Sigma_{gas}^{1.5} Where A...
  15. M

    Compute the gradient of a quantiy on a grid

    Hi, this might be a stupid question, but I was wondering how to computer the gradient of a quantity on a grid. I mean I have a grid made of cells (not necessarily of the same size) where the variable \rho is defined at the center of every cell. How can I compute the gradient of this quantity? It...
  16. M

    Computing the halo mass function and the SFH

    Hi, I have a catalog of dark matter halos, which consists of their COM positions and their masses. I need to determine the halo mass function. How can I do? I mean, it is easy to plot the number of halos between mass M and M+dM, but how can I have information on the volume? I don't get it...
  17. M

    How to recover comoving quantities

    Hi, I have a little problem, I'm using a code to run cosmological simulation and I have to recover the physical unities of every quantities. The problem is that there isn't a proper guide for this program. I try to explain. All I have for every output/redshift is: aexp unit_l unit_t The...
  18. M

    How to make statistics on a formula

    Hi everyone, I've derived a formula which computes a certain quantity. This is the equation: f(x,t)=a(x,t)-\frac{1}{n}b(x)f(x,t)^{(1-n)/n}\frac{\partial f(x,t)}{\partial t} I need to prove that f(x,t)\sim a(x,t). All I have is that 0.5 < n < 2 , b(x) is a decreasing function of x...
  19. M

    Radial component of velocity

    Hi there, I'm really ashamed of doing this stupid question but I really need help with this thing. And, even if it's simple, it's not homework. I have a point P=(x,y,z) with velocity v=(vx,vy,vz) how can I determine the radial component of the velocity? My answer is that...
  20. M

    Help with this PDE

    I need help with this PDE, it's not an homework, I need to solve it for my thesis and it has physical application...anyway the problem is: \frac{dx}{dt}=f(t)g(r)+\frac{v}{r}\frac{d (Rx)}{dR} f(t) and g(r) are known. I can solve the equation with only the first or the second term ...
  21. M

    Difficult integral

    I don't know where to start with this integral ... \int_0^t\frac{e^{-x/h}(a+b(x-c))xdx}{(a+b(x-c)-1)} can you give me a hand?
  22. M

    Prove that a function must have only x dependency

    If I have this equation: \int_0^{+\infty}{\frac{e^{-x}}{\int_{\Delta T}f(x,t)}f(x,t)xdx}=Ag(t) I am interested to show that f(x,t) must be g(t). This condition must be necessary and sufficient. Is this possible to prove?
  23. M

    Solving inequalities with three variables

    Can you help me solve this inequality for x? \frac{1+(\gamma+x(r-\alpha)-1)t}{1+\frac{\gamma+x(r-\alpha)-1}{2}}>0 where \gamma>1, 0<t<1, 0<r<3\alpha, \alpha>0 I really don't know where to start ...
  24. M

    Problem with in defining a function to be even or odd

    If I have \int_0^{+\infty}h(x)g(x)dx=0 where h(x)>0 in [0,+\infty]. Can I conclude that g(x) might be zero or an odd function in such interval? If the condition above is still valid and I add this request: g(x)=(f(x)-q) where f(x) is positive function in the interval. Can I say that...
  25. M

    Trouble with this differential equation

    Hi! can you help me to solve this differential equation? (x+1)f^{\prime}(x)-xf(x)+c=0 c is a constant
  26. M

    Condition of f(x,t)

    Hi, it is possible to solve the following problem, I mean give at least some conditions on f(x,t)? \int_0^{\infty}e^{-x}[f(x,t)+g(t)] xdx=g(t)
  27. M

    Integral with exponential function

    Hi everyone, here is this integral I can't find solution: \int_0^\infty \frac{x e^{-x}}{A+Bx} dx A and B are constants. I'm going crazy, I don't think there is even an analytical solution.
  28. M

    Adding a threshold in numerical codes

    Hi, I noticed such a strange behavior in my code every time I add a threshold: little oscillation around the threshold value itself. For example f(x) = g(x), x > x_c f(x) = 0, x <= x_c \frac{dx}{dt}=f(x) I solve the last equation and I find this oscillation. Can they be removed?
  29. M

    Problems with Runge-Kutta method

    Hi everyone, I've a little problem with my algorithm. I have two grids: one for time and the other one for the radius. I need to evaluate this equation: \frac{d\beta(r,t)}{dt}=A\beta(r,t)^N I try solving this with a simple Runge Kutta II method, but I'm not convinced at all that this works...
Top