-e^(-x) works for the second also.

to express this concept as a differential equation we simply do what the description says:

the function whose second derivative is itself:

let the function be , then we are looking for solutions to

or

the function whose second derivative is the negative of itself:

let the function be , then we are looking for solutions to

or