# Self-referential integration

Suppose that we have a function that refers to itself in its derivative or second derivitive.
For example, let's say that you have a spring for which the force is directly proportional to the distance the spring has been compressed.
F = -cx
For simplicity's sake, mass is constant, so we can just say
a = -cx
The differential-form equation for this acceleration is:
d2x/(dt)2 = -cx
And so the speed equation is
dx/dt = v0 + [inte]-cx(dt)

How would you solve this?

Or, for a simpler equation, say that the velocity of a particle depends on its position:
dx/dt = c1 + c2x

How would you solve this to get to the position function?

Last edited:

HallsofIvy
Homework Helper
The exponential function is ideal for what you call "self referential" d (exp(x))/dx= x.

Since cos(x)= (exp(ix)- exp(-ix))/2 and
sin(x)= (exp(ix)- exp(-ix))/(2i), sine and cosine also work.

In particular if d2x/dt2= -kx, (a "linear, homogeneous differential equation with constant coefficients")
Then x(t)= C1cos([sqrt](k)t)+ C2sin([sqrt](k)t) where C1 and C2 can be any constants.

For your second example, dx/dt= c1+ c2x, since this is a separable first order differential equation, we can write it in "differential form" and integrate:

dx/dt= c1+ c2x is the same as

dx/(c1+ c2x)= dt

We can integrate the left by using the substitution u= c1+ c2x so du= c2dx and the integral is (1/c2)[int](1/u)du= (1/c2)ln|u|
or (1/c2)ln|c1+ c2x|.

Integrating both sides,
(1/c2)ln|c1+ c2x|= t+ C where C is the "constant of integration".

Of course we can rewrite this as
ln|c1+ c2x|= c2(t+ C) and, taking the exponential of both sides,

c1+ c2x= C' exp(c2t)
(C' is exp(c2C) so that x is again an exponential function:

x(t)= (1/c2)(C' exp(c2t)- c1).

Originally posted by HallsofIvy
The exponential function is ideal for what you call "self referential" d (exp(x))/dx= x.

An exponential function something to the x, such as ex? And such a function has a derivitive proportional to it. d(ax)/dx = ln(a)*ax. This doesn't work for my problem, except when the initial velocity is 0, because the addition makes it not proportional.

You can't have x' = x + c for an ax equation. You could have (x+c)' = x, but not x' = x + c

Since cos(x)= (exp(ix)- exp(-ix))/2 and
sin(x)= (exp(ix)- exp(-ix))/(2i), sine and cosine also work.

Are those supposed to be the hyperbolic trig functions? The only difference between those and the hyperbolic trig functions that I have learned is the inclusion of i, which I am assuming is the imaginiary sqrt(-1).

HallsofIvy
Homework Helper
AN exponential function is any function that has the variable, x, as an exponent. THE exponential function is specifically ex.

An exponential certainly will help with something like x'= x+ c.

This is what is known as a "linear non-homogeneous differential equation with constant coefficients". The simplest way to solve it is to drop the constant, c, so as to have a homogenous equation:
x'= x whose solution is, of course, x(t)= Aet (A is an arbitrary constant). Since the differential equation is linear, we can simply add that to any solution of the entire equation. To get that constant c, note that the derivative of any constant is 0 so that if x= B (a constant) x'= 0 and the equation becomes 0= B+ c.
x= B= -c works. The general solution to the differential equation
x'= x+ c is x(t)= Aet- c.

No, those are not the hyperbolic functions, those are the standard trigonometric functions.

Since (sin t)'= cos t and (cos t)'= - sin t,
they satisfy the equation x"= -x.

Since the hyperbolic functions can be written in terms of exponentials, they satisfy (cosh t)'= sinh t and (sinh t)'= (cosh t) and thus x"= x.