I would like to find the optimal paths of $d[t]$ and $k[t]$ that maximize the following function: $$J(x)=\int_0^\infty e^{-pt}(d[t]-d[t]^2-d'[t]^2+k[t]-k[t]^2-k'[t]^2+d[t]k[t])$$
Using Mathematica and EulerEquations, I get the two following differential equations: $$e^{-pt}(1-2d[t]+k[t]-2pd'[t]+2d''[t])=0$$ $$e^{-pt}(1-2k[t]+d[t]-2pk'[t]+2k''[t])=0$$
Suppose I have some initial conditions $d[t]=\alpha$ and $k[t]=\beta$ and I am looking at an infinite time horizon. How do I set up the transversality conditions and get the optimal time paths of d and k? The text that I am using (Chiang, 1992) doesn't explicate this procedure very well.
My ultimate goal here is to be able to get optimal time paths for d and k given any pair of initial conditions, then take the derivative of the two functions so that I can get the optimal initial rate of change at $t=0$.
Any help, especially in "laymen" terms, would be greatly appreciated!