Solving for a function, quite confounding
1 view (last 30 days)
Show older comments
I am trying to solve for n_{H0} in the following physical equation:
0 Comments
Answers (1)
Roger Stafford
on 3 Aug 2014
Though you haven't said so, I assume that R, c, k, and T are also constants. I also assume that since a_nu as you defined it does not depend on the variable 'r', it can be removed from the inner integral inside the exponential, leaving just the integral of n_H0(r) with respect to r. Finally I assume that the r^2 in the denominator of the outer integral does not vary as nu is varied in the integration, so that it can be factored outside also. Are these all correct assumptions?
(By the way, it is poor practice to use the same symbol 'r' for the variable of integration on the inner integral and for the r^2 in the outer integral. Doing so can lead to confusion.)
Given these assumptions, this can be construed as a problem for matlab's 'fzero' function. Let us denote by 'x' the assumed value of the inner integral (without the a_nu) from R to infinity. From this assumed value of x we can do numerical integration with respect to nu to determine the outer integral (without the r^2). Then we can solve for n_H0 in the resulting quadratic equation and obtain it as a function of 'r' (which was removed from the outer integral.) Then numerical integration can be used on this function of r to obtain the actual inner integral of n_H0 with respect to r from R to inf which we could call y. The task for 'fzero' is to so adjust x that eventually y-x equals zero. There is of course the ambiguity that the quadratic equation has two roots, but very likely one of these can be quickly ruled out as physically inadmissible.
8 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!