Search results

  1. M

    How to solve an integral with the Inverse error function

    Thanks, the problem seems very complicated and I think I have to resort to a numerical integration. However, that would be easier if one could write \mathcal{I}(\xi,\beta)=f(\beta)\mathcal{I}^{\prime}(\xi) so this way I would have to integrate only once. Do you see a way to possibly achieve that?
  2. M

    How to solve an integral with the Inverse error function

    Thank you for your answer. But I don't understand how I can Taylor expand where the integrand diverges. Also, do you see a way to normalize the integral and/or make it more simple to solve it numerically. What I find challenging is that for every value of beta I have to numerically solve the...
  3. 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...
  4. M

    I'm stuck in grad school

    I won a scolarship two years ago but my supervisor is not really paying for me. But you're right, I have to talk to him as soon as possible. I'm just very afraid of doing it because I think I might lose it and compromise my future. I'm really pissed off because I won the scholarship because I...
  5. M

    I'm stuck in grad school

    It sucks because I only have one year left and I really don't know where else to turn. I do know how to program but I certainly don't have the skills to work in a big company that require senior positions. Do you know where I can look for companies that hire programmers and also offer some sort...
  6. M

    I'm stuck in grad school

    I'm located in Europe and the PhD only last three years. I can program in Python, Fortran and C and I am bilingual. My supervisor keeps saying that we have to perfect things and he's afraid of comments of possible referees, that's why I'm not publishing anything.
  7. 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...
  8. 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 ( but I also have to use adaptive time stepping to...
  9. 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...
  10. M

    Difficult non-linear differential equation

    Ok, now I got it, thanks a lot for you time!
  11. M

    Difficult non-linear differential equation

    Sorry but I don't understand how to compute the Ks considering them as arrays. I tried googling it but I couldn't find anything. Can please you make an example?
  12. M

    Difficult non-linear differential equation

    Ah ok, thanks. So in my case, since I don't have an explicit time dependency the ks should be k1=hf(x_{i},v_{i}) k2=hf(x_{i}+k1/2,v_{i}+k1/2,) k3=hf(x_{i}+k2/2,v_{i}+k2/2) k4=hfx_{i}+k3,v_{i}+k3) Is that right?
  13. M

    Difficult non-linear differential equation

    Thanks that helped but I have still some problem in computing v. According to what you wrote and the runge Kutta IV method definition the k should be: k1=hf(t_{i},x_{i}) k2=hf(t_{i+1/2},x_{i}+k1/2) k3=hf(t_{i+1/2},x_{i}+k2/2) k4=hf(t_{i+1},x_{i}+k3) How is v for every k?
  14. 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...
  15. 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...
  16. M

    How to get Euler angles

    You're right! But sorry if I insist, I just want to get this straight. If I only know the new z-axis and x and y could be in directions, although forming an orthonormal system, does this means that I could choose my angle gamma to be any value between 0 and 2pi?
  17. 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...
  18. 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...
  19. 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...
  20. 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...
  21. 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...
  22. M

    Expansion of HII regions

    Thanks, that helped a lot! But there's still something I don't understand. Let's say the the shell in not moving, why the pressure of mass traveling inward is positive?
  23. M

    Expansion of HII regions

    I'm trying to understand what Eq. 15 of this paper...
  24. 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...
  25. 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...
  26. M

    Compute the gradient of a quantiy on a grid

    I didn't understand all you said ... I think I found the solution but I'm still a little bit concerned. I need to computer a 3D gradient and for every direction I can use the "5-point finite difference approximation" of the gradient...
  27. 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...
  28. 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...
  29. 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...
  30. 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...