This is, I believe, a nonlinear differential equation but if it is linear, I don't really care. What I want is to be able to solve it now.

C*V[t]*V'[t] + (C^2)*R*V'[t]^2 - P == 0

C, R and P are constants.

V[t] is a time-dependent function which I'm trying to solve.

It seems this should be a no brainer for Mathematica and unless I'm doing something wrong (which is quite possible since I just started using this software today), I don't understand why I'm having so much trouble.

Any help is greatly appreciated! Please post the correct solver and corresponding syntax.

This the solver I used: DSolve[C*V[t]*V'[t] + (C^2)RV'[t]^2 - P == 0, V[t], t]

And the answer I got: {{V[t]->InverseFunction[1/8 (4 Log[#1+Sqrt[4 P R+#1^2]]+(#1 (-#1+Sqrt[4 P R+#1^2]))/(P R))&][-(t/(2 C R))+C[1]]},{V[t]->InverseFunction[1/8 (4 Log[#1+Sqrt[4 P R+#1^2]]+(#1 (#1+Sqrt[4 P R+#1^2]))/(P R))&][t/(2 C R)+C[1]]}}

What are these #?

  • $\begingroup$ What solver did you in your attempt to solve your ODE? Please edit your question so it shows the solver expression you tried $\endgroup$ – m_goldberg Apr 9 '18 at 4:47
  • 1
    $\begingroup$ Since you are a beginner at solving ODEs, you should start by reading this tutorial material $\endgroup$ – m_goldberg Apr 9 '18 at 4:53
  • $\begingroup$ InverseFunction[] means what it says: it represents the inverse of the function given to it, e.g. InverseFunction[Log] is the same as Exp[]. In your specific case, it is representing the inverse of f[x_] := 1/8 ((x (-x + Sqrt[4 P R + x^2]))/(P R) + 4 Log[x + Sqrt[4 P R + x^2]]); the slots (#) are standing in for x $\endgroup$ – J. M. will be back soon Apr 9 '18 at 5:56
  • $\begingroup$ @J.M. Thank you for your input. OK so in my specific case, # stands for t (since V[t] is what I'm solving for, correct? What is the number following the # sign? (i.e. #1). How do I get Mathematica to print t instead? $\endgroup$ – Cachi Apr 9 '18 at 6:16
  • $\begingroup$ #1 specifically stands in (#) for the first (1) argument of the pure function within InverseFunction[]. (Look up Slot[] in the docs for more details.) In your particular case, that function inside is t as a function of V, which you now invert to get your DE's solution. For your further edification, compare the results of InverseFunction[Function[x, x^2]] and InverseFunction[#1^2 &]. $\endgroup$ – J. M. will be back soon Apr 9 '18 at 8:48

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.