On some of the queries, I have seen people ask on how to draw linear inequalities (i.e. how to fill the area with color based on the inequality). Sorry, my code is super long:
\documentclass[12pt]{article}
\usepackage{pgfplots}
%\pgfplotsset{compat=1.16}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{changepage}
\usepackage[margin=1in]{geometry}
\usepackage{float}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{decorations.markings}
\tikzset{arrow marks/.style={postaction=decorate,decoration={markings,
mark=between positions #1 and 1 step #1 with {\arrow{>}}}},
arrow marks/.default=10pt}
\begin{document}
\begin{figure}[H]
\begin{adjustwidth}{-0.7in}{-0.7in}
\centering
\begin{tikzpicture}
\def\a{0.5}
\def\lambda{5}
\def\xTwoInitPosToZeroOne{1.5}
\def\xOneInitPosToZeroOne{ln(1 +(\lambda*\a* \xTwoInitPosToZeroOne)/(\lambda + 2*\a*\xTwoInitPosToZeroOne))/(\a^2) - \xTwoInitPosToZeroOne/\a}
\def\zeroControlPosToNegOne{ln((2*\a* \xTwoInitPosToZeroOne + \lambda)/\lambda)/\a}
\def\xTwoInitPosToZeroTwo{2}
\def\xOneInitPosToZeroTwo{ln(1 +(\lambda*\a* \xTwoInitPosToZeroTwo)/(\lambda + 2*\a*\xTwoInitPosToZeroTwo))/(\a^2) - \xTwoInitPosToZeroTwo/\a}
\def\zeroControlPosToNegTwo{ln((2*\a* \xTwoInitPosToZeroTwo + \lambda)/\lambda)/\a}
\def\xTwoInitPosToZeroThree{3}
\def\xOneInitPosToZeroThree{ln(1 +(\lambda*\a* \xTwoInitPosToZeroThree)/(\lambda + 2*\a*\xTwoInitPosToZeroThree))/(\a^2) - \xTwoInitPosToZeroThree/\a}
\def\zeroControlPosToNegThree{ln((2*\a* \xTwoInitPosToZeroThree + \lambda)/\lambda)/\a}
\def\xTwoInitNegToZeroOne{-1.5}
\def\xOneInitNegToZeroOne{-ln(1 -(\lambda*\a* \xTwoInitNegToZeroOne)/(\lambda - 2*\a*\xTwoInitNegToZeroOne))/(\a^2) - \xTwoInitNegToZeroOne/\a}
\def\zeroControlNegToPosOne{ln((-2*\a* \xTwoInitNegToZeroOne + \lambda)/\lambda)/\a}
\def\xTwoInitNegToZeroTwo{-2}
\def\xOneInitNegToZeroTwo{-ln(1 -(\lambda*\a* \xTwoInitNegToZeroTwo)/(\lambda - 2*\a*\xTwoInitNegToZeroTwo))/(\a^2) - \xTwoInitNegToZeroTwo/\a}
\def\zeroControlNegToPosTwo{ln((-2*\a* \xTwoInitNegToZeroTwo + \lambda)/\lambda)/\a}
\def\xTwoInitNegToZeroThree{-3}
\def\xOneInitNegToZeroThree{-ln(1 -(\lambda*\a* \xTwoInitNegToZeroThree)/(\lambda - 2*\a*\xTwoInitNegToZeroThree))/(\a^2) - \xTwoInitNegToZeroThree/\a}
\def\zeroControlNegToPosThree{ln((-2*\a* \xTwoInitNegToZeroThree + \lambda)/\lambda)/\a}
\begin{axis}[
%xtick distance = {1},
%ytick distance = {1},
xmin=-12,xmax=12,
ymin=-8,ymax=8,
height = 7in,width=1.2\textwidth,
axis lines=center,
axis line style=->, xlabel = {$x_1$}, ylabel={$x_2$},
%axis equal,
legend cell align = {left},
every axis x label/.style={at={(ticklabel* cs:1.05)}, anchor=west,},
every axis y label/.style={at={(ticklabel* cs:1.05)}, anchor=south,},
title= {Bang-off-bang Control Trajectories}, title style={xshift=0, yshift=2em},
domain=-15:15,samples=300,legend pos=outer north east]
\addplot[->,>=latex,arrow marks=1cm,color = blue, thick, domain = -8:0,tips=proper]({-ln(1-\a*x)/\a^2 - x/\a}, {x}) node[below left, pos = 0.3, font = \small] {\(u^* = 1\)};
\addplot[->,>=latex,arrow marks=1cm,color = red, thick, domain = 8:0,tips=proper]({ln(1+\a*x)/\a^2 - x/\a}, {x}) node[above right, pos = 0.3, font = \small] {\(u^* = -1\)};
\addplot[dotted, color = black, thick, domain = 8:0,tips=proper]({ln(1+(\lambda*\a*x)/(\lambda + 2*\a*x))/\a^2 - x/\a}, {x});
\addplot[dotted, color = black, thick, domain = -8:0,tips=proper]({-ln(1-(\lambda*\a*x)/(\lambda - 2*\a*x))/\a^2 - x/\a}, {x}) node[above right, pos = 0.3, font = \small] {\(u^* = 0\)};
%%Starting from here, I am not sure if this is necessary or not
\addplot[->,>=latex,arrow marks=1cm, tips = proper,
color=red, dashed,thick,domain=-6:0]
({x/\a + (\xTwoInitPosToZeroOne/\a - 1/(\a^2))*(1 - exp(-\a*x)) + \xOneInitPosToZeroOne}, {1/\a + (\xTwoInitPosToZeroOne - 1/\a)*exp(-\a*x)});
\addplot[->,>=latex, color=red, tips = proper, dashed,thick,domain=0:\zeroControlPosToNegOne] ({(\xTwoInitPosToZeroOne/\a)*(1 - exp(-\a*x)) + \xOneInitPosToZeroOne}, {\xTwoInitPosToZeroOne*exp(-\a*x)});%1 Pos
\addplot[->,>=latex,arrow marks=1cm, tips = proper,
color=red, dashed,thick,domain=-6:0]
({x/\a + (\xTwoInitPosToZeroTwo/\a - 1/(\a^2))*(1 - exp(-\a*x)) + \xOneInitPosToZeroTwo}, {1/\a + (\xTwoInitPosToZeroTwo - 1/\a)*exp(-\a*x)});
\addplot[->,>=latex, color=red, tips = proper, dashed,thick,domain=0:\zeroControlPosToNegTwo] ({(\xTwoInitPosToZeroTwo/\a)*(1 - exp(-\a*x)) + \xOneInitPosToZeroTwo}, {\xTwoInitPosToZeroTwo*exp(-\a*x)});%2 Pos
\addplot[->,>=latex,arrow marks=1cm, tips = proper,
color=red, dashed,thick,domain=-6:0]
({x/\a + (\xTwoInitPosToZeroThree/\a - 1/(\a^2))*(1 - exp(-\a*x)) + \xOneInitPosToZeroThree}, {1/\a + (\xTwoInitPosToZeroThree - 1/\a)*exp(-\a*x)});
\addplot[->,>=latex, color=red, arrow marks=1cm, tips = proper, dashed,thick,domain=0:\zeroControlPosToNegThree] ({(\xTwoInitPosToZeroThree/\a)*(1 - exp(-\a*x)) + \xOneInitPosToZeroThree}, {\xTwoInitPosToZeroThree*exp(-\a*x)});%3 Pos
\addplot[->,>=latex,arrow marks=1cm, tips = proper,
color=blue, dashed,thick,domain=-6:0]
({-x/\a + (\xTwoInitNegToZeroOne/\a + 1/(\a^2))*(1 - exp(-\a*x)) + \xOneInitNegToZeroOne}, {-1/\a + (\xTwoInitNegToZeroOne + 1/\a)*exp(-\a*x)});
\addplot[->,>=latex, color=blue, tips = proper, dashed,thick,domain=0:\zeroControlNegToPosOne] ({(\xTwoInitNegToZeroOne/\a)*(1 - exp(-\a*x)) + \xOneInitNegToZeroOne}, {\xTwoInitNegToZeroOne*exp(-\a*x)});%1 Neg
\addplot[->,>=latex,arrow marks=1cm, tips = proper,
color=blue, dashed,thick,domain=-6:0]
({-x/\a + (\xTwoInitNegToZeroTwo/\a + 1/(\a^2))*(1 - exp(-\a*x)) + \xOneInitNegToZeroTwo}, {-1/\a + (\xTwoInitNegToZeroTwo + 1/\a)*exp(-\a*x)});
\addplot[->,>=latex, color=blue, tips = proper, dashed,thick,domain=0:\zeroControlNegToPosTwo] ({(\xTwoInitNegToZeroTwo/\a)*(1 - exp(-\a*x)) + \xOneInitNegToZeroTwo}, {\xTwoInitNegToZeroTwo*exp(-\a*x)});%2 Neg
\addplot[->,>=latex,arrow marks=1cm, tips = proper,
color=blue, dashed,thick,domain=-6:0]
({-x/\a + (\xTwoInitNegToZeroThree/\a + 1/(\a^2))*(1 - exp(-\a*x)) + \xOneInitNegToZeroThree}, {-1/\a + (\xTwoInitNegToZeroThree + 1/\a)*exp(-\a*x)});
\addplot[->,>=latex, color=blue, arrow marks = 1cm, tips = proper, dashed,thick,domain=0:\zeroControlNegToPosThree] ({(\xTwoInitNegToZeroThree/\a)*(1 - exp(-\a*x)) + \xOneInitNegToZeroThree}, {\xTwoInitNegToZeroThree*exp(-\a*x)});%3 Neg
\end{axis}
\end{tikzpicture}
\end{adjustwidth}
\caption{Optimal control trajectories for Problem 4 for $a = 0.5$ and $\lambda = 5$. The solid plot is the final switching curve, the dotted plot is the switching curve to ``off" mode, while the dashed plots are the state trajectories that are not originally on the switching curve.}
\end{figure}
\end{document}
I put Starting from here, I am not sure if this is necessary or not
because I am not sure if the color filling will fill over the dashed curves. Here is my output (with "highlights"):
What I am looking for is that on the LHS (i.e. to the left of the top part of the black dotted curve and to the left of the blue solid curve), I want to shade that area red (or pink, with some opacity), the area between the dotted and the solid curves (both red and blue) orange (or any color), and the RHS (i.e. to the right of the bottom part of the black dotted curve and to the right of the red solid curve) blue (with some opacity). Is there a way of doing so (without covering the dashed curves)?