Solving a system of first order differential equations

73 Views Asked by At

So, I have (another) problem with differential equations (from an optimal control problem). I am trying to solve the following system of DEs (is this even a system?):

$$ \lambda'(t) = r \lambda(t) + x' h(x(t)) \\ \lambda = g(x(t)) \\ \lambda(T) = 0, \quad x(0)=0 $$

with $x: [0,T] \to \mathbb{R}_+$ and $\lambda: [0,T] \to \mathbb{R}$

So, I thought, the 2nd equation is really simple (and $g$ has nice properties, including being cont. differentiable), so I tried to just try to get one DE in $x'$ and replace $\lambda$ with $g(x)$ and $\lambda'$ with $\frac{d g(x(t))}{d t} = x'g'(x(t))$.

When I now try to solve the resulting initial value problem:

$$ x'(t) g'(x(t)) = r g(x(t)) + x'(t) h(x(t)), \quad x(0) = 0$$

So this is the point when I realized: something went wrong. I completely ignored $\lambda(T) = 0$ and when trying to solve an example I get a solution which seems to be for a problem without $\lambda(T) = 0$ (big surprise!), which is clearly wrong for a finite $T$.

So finally my question(s): What did I do wrong? And how can I fix it? Is there a general way to solve the initial value problem I stated at the beginning for nice $g$ and $h$?