Hello, I would appreciate very much some help on this problem.
I have a Hernquist model (distribution function) and I am trying to generate equal mass initial conditions. The way I do it is this. I have the mass profile M(r) and I pick say 10^6 random numbers between 0 and 1=M(r->inf). Then I...
Hmmm, I think I did it(although I am sure there is a more elegant way).
First I used
CForm[expresion] /. Power -> pow
and the I used the output as a string and I used:
StringReplace["output",{"y0" -> "y[0]", "y1" -> "y[1]", "y2" -> "y[2]", "y3" -> "y[3]"}]
Hi all,
here is a question for mathematica experts(or not :smile:)
I have an expression of the form:
-6615. y[0] + 282.72 y[0]^3 + 1.3244 y[0]^5 - 0.002624 y[0]^7 -
178.28 y[1] + 152.912 y[0]^2 y[1]-((1309.5 y[0]^3 y[1]^4)/(y[0]^2 + y[1]^2)^4)...
and I want to transfer this expression to...
Hello,
I have an interpolated function at mathematica
x->InterpolatingFunction blahblahblah
which looks like a sin
I want to find all the roots between {x0,x1} (in a list if possible)
Is there any way to achieve this?
I tried FindRoot and Reduce but I couldn't...