I have the following differential equation:
a*L'[t] == 40000*L[t]^(-3/2) - 1.4 - extf
I want to fit the solution to data in order to acquire a. I tried DSolve with a=1 and separation of variables:
Clear[t]
Clear[L]
extf = 15
tmax = 100
solt = Integrate[1/(40000*L0^(-3/2) - 1.4 - extf), {L0, 10, L}, Assumptions -> 10 < L < 181.194];
solL = L -> InverseFunction[Evaluate[solt] & /. L -> #]
N[L[1000] /. solL]
OUTPUT= -16618.8 - 341.659i
This is wrong (should be around 170..) so that I tried NDSolve:
Clear[t]
Clear[L]
Clear[a]
extf = 15
tmax = 100
solution = ParametricNDSolve[{a*L'[t] == 40000*L[t]^(-3/2) - 1.4 - extf,
L[0] == 10}, L, {t, 0, tmax}, {a}]
Manipulate[ Plot[Evaluate[L[a][t] /. solution], {t, 0, tmax},
PlotRange -> All], {a, 1, 2}]
That gives me the right graph but I cannot fit this result to my data to obtain the right a nor is it as nice as a analytic expression.
What is going wrong with DSolve?