\documentclass[leqno]{article}
\usepackage{verbatim}
\usepackage[cmbase]{flexisym}
\usepackage{breqn}
\setkeys{breqn}{compact}

\setlength{\textwidth}{180mm}
\setlength{\oddsidemargin}{15mm}
\addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{15mm}
\addtolength{\evensidemargin}{-1in}

\newcommand{\ifrac}[2]{\frac{#1}{#2}}
\newcommand{\ifracd}[2]{\frac{#1}{#2}}
\newcommand{\ifracn}[2]{\frac{#1}{#2}}
\newcommand{\isubscript}[2]{{#1}_{#2}}
\newcommand{\iexpt}[2]{{#1}^{#2}}
\newcommand{\isqrt}[1]{\sqrt{#1}}
\begin{document}
\begin{verbatim}
Maxima 5.21.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.

(%i1) de: 'diff(P,t) = r*(M-P)*P;

\end{verbatim}

\begin{dmath}[number={\%o1}]
 \ifracd{d}{d\,t}\,P=r\,\left(M-P\right)\,P\end{dmath}

\begin{verbatim}
(%i2) ode2(de,P,t);

\end{verbatim}

\begin{dmath}[number={\%o2}]
 -\ifrac{\log \left(P-M\right)-\log P}{r\,M}=t+\mathrm{\%c}\end{dmath}

\begin{verbatim}
(%i3) %*r*M, %c=log(C)/(r*M), logcontract;

\end{verbatim}

\begin{dmath}[number={\%o3}]
 \log \left(\ifracd{P}{P-M}\right)=r\,t\,M+\log C\end{dmath}

\begin{verbatim}
(%i4) map(exp,%);

\end{verbatim}

\begin{dmath}[number={\%o4}]
 \ifracd{P}{P-M}=C\,e^{r\,t\,M}\end{dmath}

\begin{verbatim}
(%i5) solve(%,P);

\end{verbatim}

\begin{dmath}[number={\%o5}]
 \left[ P=\ifrac{C\,M\,e^{r\,t\,M}}{C\,e^{r\,t\,M}-1} \right] \end{dmath}

\begin{verbatim}
(%i6) gsol: first(%);

\end{verbatim}

\begin{dmath}[number={\%o6}]
 P=\ifrac{C\,M\,e^{r\,t\,M}}{C\,e^{r\,t\,M}-1}\end{dmath}

\begin{verbatim}
(%i7) sde: de, r=1, M=2;

\end{verbatim}

\begin{dmath}[number={\%o7}]
 \ifracd{d}{d\,t}\,P=\left(2-P\right)\,P\end{dmath}

\begin{verbatim}
(%i8) load("drawdf");

\end{verbatim}

\begin{dmath}[number={\%o8}]
 \verb|/home/mhw/.maxima/drawdf.mac|\end{dmath}

\begin{verbatim}
(%i9) wxdrawdf(rhs(sde), [t,0,4], [P,0,5], show_field=false, tstep=0.05, color=black, apply(solns_at, makelist([0,p], p, [0.1,0.5,1,2,3,4,5])))$

\end{verbatim}

\begin{dmath}[number={}]
 /home/mhw/maxout_1.eps\end{dmath}

\begin{verbatim}
(%i10) \end{verbatim}


\end{document}
