Please see the attached screenshot of the code which was written in Mathematica 8 on Windows for solving differential equation contaning PolyGamma function and then plotting it. Now the same code is not working in Mathematica 10. Can someone help me in rectifying it?

PolyGamma ODE


Since Mathematica is happy to treat PolyGamma as a function in it's own right you really want to be using Solve. While you're right that PolyGamma is a differential function of Gamma, there are similar relationships between $\cos$ and $\sin$, and we wouldn't whip out a differential equation solver (necessarily) to solve $ \sin(f[x])=\cos(g[x])+\cdots $. We would solve using inverse functions of $\sin{}$ and $\cos{}$.

This is indeed what DSolve was doing even in Mathematica 8, wrapping Solve. The short answer is to just use Solve with the InverseFunctions->True argument:

Tc = 89.9; m = 2.71;
eqn= Log[Tc/x]  == PolyGamma[(x + Tc + y[x])/(2 x)] - PolyGamma[1/2] ;
sol=Solve[eqn, y[x], InverseFunctions -> True] // Flatten

Interestingly, with exact Tc=899/100 your equation has a cute simplification:



HarmonicNumber[(899 - 10 x + 10 y[x])/(20 x)] == Log[899/(40 x)]

Whose solution with inverse functions yields:

{y[x] -> (-899 + 10*x + 20*x*InverseFunction[HarmonicNumber][Log[899/(40*x)]])/10}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.