So I have a non-trivial two-variable function, $f(p, M)$. I would like to make a 2d plot of this function against the variable $\frac{p}{M}$ i.e. the ratio of the two parameters.

The tricky part is that the ratio $\frac{p}{M}$ is not explicitly present in the function so it is not as straightforward as just substituting e.g. $u = \frac{p}{M}$ directly in the function.

The function reads:

(496.1 (1.99658*10^-15 + (0. (2.71828^(-1884.96/M))^(4/3))/M^2) (1.99658*10^-15 - (2.2006*10^-6 (2.71828^(-1884.96/M))^(4/3) p)/M^2) (-6.65526*10^-16 + 3.25335*10^-16 M^3 + (1/(M^7))1.64516*10^-8 (2.71828^(-1884.96/M))^(8/3) (0. (2.71828^(-1884.96/M))^(2/3) M^5 + 22.2937 2.71828^(3769.91/M) (2.71828^(-1884.96/M))^(2/3) M^5 p + 6.28319*10^9 p^2)))/(Sqrt[7.42877*10^-13 + (0. (2.71828^(-1884.96/M))^(4/3))/M^2] - 1. Sqrt[7.42877*10^-13 -(0.000818787 (2.71828^(-1884.96/M))^(4/3) p)/M^2])^2

I was thinking that maybe it is possible to generate a data set, keeping M = 100 fixed and then let p range between 0 and 100 in arbitrarily small steps.

The problem is that it would be nice not having to fix M, since I don't what it is best to fix M to. But maybe that is the only way?

Any ideas?

  • $\begingroup$ I would substitute p->u M, then plot curves as a function of u for different values of M $\endgroup$
    – mikado
    May 20 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.