# Is it possible to solve a differential equation without analytical term?

I have been confused by this differential equation for several days. I have an equation like this:

$$my′′(t)=cV′(y(t))−ny′(t)$$

Where m,c,n are known parameters. And V(y(t)) is a two dimensional coordinate data set $$(y(t1),V1),(y(t2),V2),...,(y(ti),Vi)$$ and I don't know the exact analytical expression of $$V(t)$$. So, is it possible to solve this differential equation? By what kind of method or algorithm?

I know maybe I could solve this equation by fitting the data set $$V(y(t))$$, and obtain an analytical expression, then substitute it into the equation and solve it. But that maybe inaccurate and sometimes it is difficult to fit the curve. So is it possible to solve this kind of equation that contains a term without analytical expression in other methods?

For example, let m=1, c=0.05, n=0.01, and let $$V'(y(t))$$:

data=Table[{t,Sin[t]},{t,0,2,0.02}]


How to solve this equation use Mathematica?

A good way of doing it is by defining an interpolating function. In order to do this you should use the Interpolation function.

Assuming that your data is stored in data (as in your own example data=Table[{t,Sin[t]},{t,0,2,0.02}]),

you can just write :

V=Interpolation[data]

From now you will be able to use the V function as well as their derivatives.

Yes you can solve your problem using Interpolation and NDSolveValue as follows.

First define V'[...]

 vs = Interpolation[Table[{t, Sin[t]}, {t, 0, 2, 0.02}]]


Second define the initial value problem (You have to define initial conditions!)

m = 1; c = .05; n = .01;
Y = NDSolveValue[{m y''[t] == c vs[y[t]] - n y'[t], y[0] == 0,y'[0] == 1}, y, {t, 0,10}]
Plot[Y[t], {t, 0, 10}, AxesLabel -> {t, y[t]}]


That's it.

• What's the difference between NDSolve and NDSolveValue? May I use NDSolve here? – shelure21 Jul 20 at 22:22
• The difference is the way that the output is presented. Using NDSolveValue returns a function (useful since it can be directly plotted). On the other hand, NDSolve returns a list of rules. – M. Veruete Jul 21 at 19:26