The reader may find it somewhat discouraging that even for simple examples like the ones we just presented, solving the HJB equation analytically is a challenging task. Nevertheless, the HJB equation gives a considerable insight into the problem, and one can often apply numerical techniques to obtain approximate solutions. We now discuss one important situation in which the HJB equation takes a simpler form. Suppose that both the control system and the cost functional are time-invariant, i.e., and , and that there is no terminal cost ( ). Keeping the final state free, we let the final time approach ; in the limit, the cost functional becomes and we have what is called an infinite-horizon problem.5.2 It is clear that in this scenario, the cost does not depend on the initial time, hence the value function depends on only: . Thus the partial derivative vanishes and the HJB equation (5.10) reduces to
The PDE (5.19) may still be difficult to solve, but it is certainly more tractable than the general HJB equation (5.10). In the special case when is scalar, (5.19) is actually an ODE. Let us consider the infinite-horizon version of Example 5.1. The HJB equation becomes from which we derive . We must choose the plus sign because should be positive definite (since is positive definite). We do not even need to solve for because the optimal feedback law is obtained from directly: .