TITLE: Exercise 8: Solution of differential equation
AUTHOR:  Hans Petter Langtangen Email: hpl@simula.no at Center for Biomedical Computing, Simula Research Laboratory & Department of Informatics, University of Oslo
DATE:  today




Given

!bt
\[ \frac{dy}{dx} = -y(x),\quad y(0)=1 \]
!et
What is the solution of this equation?


$y=e^{-y}$

$y=e^{y}$

Almost, but the sign is wrong (note the minus!).

!bc pycod
from math import exp
def f(x):
    return exp(x)
!ec

Ooops, forgot a minus: `exp(-x)`, otherwise this Python code
must be considered as a good answer. It is more natural,
though, to write the solution to the problem
in mathematical notation:

!bt
\[ y(x) = e^{-y}.\]
!et

The solution cannot be found because there is a derivative in the equation.

Equations with derivatives can be solved;
they are termed *differential
equations*.

The equation is meaningless: an equation must be an equation
for $x$ or $y$, not a function $y(x)$.

Equations where the unknown is a function, as $y(x)$
here, are called *differential equations*, and are solved by
special techniques.
