# Question:Solving an optimal control problem

## Question:Solving an optimal control problem

Maple 2019

Hello all

I wanna solve an optimal control problem and I have searched the Internet but I could not find any tutorial or video course on how to solve it with the Pontryagin maximum principle method. It is my first time that I want to use MAPLE for solving an optimal control problem and I would be thankful if someone can help me.

$$\max \int_{0}^{1} x_{2} [u(t)-u(t)^2] dt$$

$$\dot{x}_{0} = -(1-u(t)) x_{0}(t)+2 x_{1}(t)$$

$$\dot{x}_{1}(t) = (1-u_{t}) x_{0}(t) +2 x_{2}(t) -[3-u(t)]x_{1}(t)$$

$$\dot{x}_{2}(t) = (1-u(t))x_{1}(t) -2 x_{2}(t)$$

$$0 \le u_{t} \le \frac{1+t^2}{1+t}$$

Thanks

﻿