Q: How to speed up Solve command in Mathematica 8.0? I have two complicated mathematical functions $f(s)$ and $g(M)$ that are complicated functions of $s$ and $M$ respectively. I would like to solve the equation $f(s)=g(M)$ in order to plot $s$ vs. $M$.
I am using the following code in order to find $s(M)$ analytically and then plot the new relation between $s$ and $M$.
h[s_?NumericQ] := 0.0627565*(s/14.9806)^38.3564*Exp[-(s/14.9806)^7.24277];
f[s_?NumericQ] := -(Log[10]*s)^-1*D[h[x], x] //.x -> s;  

p[M_] := 129.4-61.66*M+11.7*M^2-1.11*M^3+0.05244*M^4-0.0009884*M^5;
q[M_] := 10^p[M];
v[M_] := (Log[10]*10^M)^-1*D[q[y], y] //.y -> M;
y[M_] := 10^(12 - M);
sigma[M_] := (16.9*(y[M])^0.41)/(1+1.102*(y[M])^0.20+6.22*(y[M])^0.333); 
dsigmadM[M_] := (Log[10]*10^M)^-1*D[sigma[x], x] //. x -> M;
xfunc[M_] := 1.686/sigma[M];
f[M_] := 0.322*Sqrt[(2*0.707)/\[Pi]]*(1+(0.707*(xfunc[M])^2)^-0.3)*xfunc[M]*Exp[-((0.707*(xfunc[M])^2)/2)]; 
Mass[M_] := -0.05152*10^12*f[M]/sigma[M]*dsigmadM[M];
g[M_] := -1695.76*(Mass[M])^-1*10^M*v[M];

Solve[f[s] == g[M], s]

However, the code runs forever after evaluating cell command in Mathematica 8.0. I am wondering if someone can give me a better line of code to solve this equation. Assuming that there is no closed analytical solution, it is fine at least being able to plot $s$ vs. $M$ numerically. Your help is greatly appreciated.
Sincerely,
