# Thread: Integrating factor in optimal control theory

1. ## Integrating factor in optimal control theory

Hey guys,

This is an optimal control problem for an econ class but it is the maths behind it I am struggling with - so have left the context out. I have derived two differential equations in my state and costate variables:

costate: $\frac {dy} {dt} = Ae^{(r+\beta)t}$

state: $\frac {dk} {dt} = \beta k - (Ae^{(r+\beta)t})^2$

where $A$ is some arbitrary constant.

Now i need to solve $\frac {dk} {dt}$ for $k$

Using the integrating factor I get:

$K = Ce^{\beta t} - \frac {A^2e^{(4r+4\beta)t}} {4r+3\beta}$

Where $C$ is another arbitrary constant. Is this right?

I then have to apply the transversality condition:

$e^{-rt} k(t) y(t) = 0$

Which using my solutions for $k$ and $y$ is:

$ACe^{2\beta t} - \frac {A^3e^{(4r+5\beta)t}} {4r+3\beta} = 0$

I won't go any further with the problem here because I am convinced I have gone wrong somewhere since the equation isn't very pretty can anyone check my value for $k$ please?

2. This is what I get:

$\frac{dk}{dt}=\beta k-A^{2}e^{(2r+2\beta)t} \Rightarrow \frac{dk}{dt}-\beta k= -A^{2}e^{(2r+2\beta)t}$

$\mu = e^{-\int \beta dt} \Rightarrow \mu = e^{-\beta t}$

$\left(K \cdot e^{-\beta t} \right)' = -A^{2}e^{(2r+2\beta)t}\cdot e^{-\beta t} \Rightarrow \left(K \cdot e^{-\beta t} \right)' = -A^{2}e^{(2r+\beta)t}$

$\int \left(K \cdot e^{-\beta t} \right)' = -A^{2}\int e^{(2r+\beta)t}$

$K \cdot e^{-\beta t} = -A^{2}\frac{e^{(2r+\beta)t}}{2r+\beta}+C$

$K = -A^{2}\frac{e^{(2r+2\beta)t}}{2r+\beta}+C_1e^{\beta t}$

When you integrate y(t), I think you are leaving off a constant:

$Y = \frac{Ae^{(r+\beta)t}}{r+\beta}+C_2$

3. thanks - have gone through it myself and got the same - my dy/dy should have just read y(t) but thanks anyway!