I have found the inverse to the following equation by using FindRoot
. I want to have a Taylor approximation (say starting from SDbeta = 0
) of the inverse function. I'm only interested in values of SDbeta <0.030
.
σ =1
Fun0[tau_, W_, Ce_] := 12 σ^2/ Ce^2*(tau^2/W^3 - 3 tau^3/W^4 + 12 tau^5/W^6 - 3 tau^3/W^6 Exp[-W/tau]*(W + 2 tau)^2)
Fun2[tau_] := Sqrt[Fun0[tau, 10, 10]]
InverseFun2[SDbeta_] := tau /. FindRoot[SDbeta == Fun2[tau], {tau,6}][[1]]
InverseFun2[0.01]
Simply using Series doesn't lead to a result
Series[InverseFun2[x], {x, 0, 5}]
FindRoot::nlnum: The function value {-0.0251585+x} is not a list of numbers with dimensions {1} at {tau} = {6.}. ReplaceAll::reps: {x==1/5 Sqrt[3] Sqrt[tau^2/1000-(3 tau^3)/10000+(3 tau^5)/250000-(3 E^Times[<<2>>] tau^3 Plus[<<2>>]^2)/1000000]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. ....
Is it possible to find a Taylor Series if, as in this case, the analytical solution is not available.
Edit: I just discovered that there is a thing called NSeries in the Numerical calculus package. Adjusting these lines in the code correspondingly:
<< NumericalCalculus`
InverseFun2[SDbeta_?NumericQ] := tau /. FindRoot[SDbeta == Fun2[tau], {tau, 6}][[1]]
NSeries[InverseFun2[x], {x, 0, 5}]
leads me to the following errors:
FindRoot::jsing: Encountered a singular Jacobian at the point {tau} = {22900.1 +0. I}. Try perturbing the initial point(s).
FindRoot::lstol: The line search decreased the step size to within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a sufficient decrease in the merit function. You may need more than MachinePrecision digits of working precision to meet these tolerances.
FindRoot::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations.
I assume those errors occur because it is trying to compute values of SDbeta that are ill defined.. Is that the case? If so, how to restrict the domain?
Fun2[tau]
depends on\[Sigma]
which isn't defined. That's the reason why FindRoot doesn't work. $\endgroup$Exp[-W/tau]
, and thereforeFun2[tau]
also, has an essential singularity attau = 0
(corresponding toSDbeta = x = 0
). The term that has that factor will contribute zero, if you use the right derivative to define the Taylor series. $\endgroup$SDbeta^2-Fubn2[tau[SDbeta]]^2==0
, then solve for the various derivatives (each will appear linearly in terms of earlier ones). $\endgroup$