File r37/doc/manual2/changevr.tex artifact cc9b13d89c part of check-in 5f584e9b52


\chapter[CHANGEVR: Change of Variables in DEs]%
        {CHANGEVR: Change of Independent Variables in DEs}
\label{CHANGEVR}
\typeout{[CHANGEVR: Change of Variables in DEs]}

{\footnotesize
\begin{center}
G. \"{U}\c{c}oluk \\
Department of Physics, Middle East Technical University \\
Ankara, Turkey\\[0.05in]
e--mail: ucoluk@trmetu.bitnet
\end{center}
}

The function {\tt CHANGEVAR} has (at least) four different
arguments.\ttindex{CHANGEVAR} 
\begin{itemize}
\item {\bf FIRST ARGUMENT} \\
     is a list of the dependent variables of the differential equation.
     If there is only one dependent variable it can be given directly,
     not as a list.
\item {\bf SECOND ARGUMENT}  \\
     is a list of the {\bf new} independent variables, or in the case
of only one, the variable.
\item {\bf THIRD ARGUMENT, FOURTH {\em etc.}}  \\
     are equations is of the form
\begin{quote}{\tt{\em old variable} = {\em a function in new variables}}\end{quote}
     The left hand side cannot be a non-kernel structure.  These give
     the old variables in terms of the new ones. 
\item {\bf LAST ARGUMENT}  \\
     is a list of algebraic expressions which evaluates to differential
     equations in the usual list notation.
     Again it is possible to omit the list form if there is
     only {\bf one} differential equation.
\end{itemize}

If the last argument is a list then the result of {\tt CHANGEVAR} is a
list too.

It is possible to display the entries of the inverse Jacobian. To do
so, turn {\tt ON} the flag {\tt DISPJACOBIAN}\ttindex{DISPJACOBIAN}.

\section{An example: the 2-D Laplace Equation}

The 2-dimensional Laplace equation in Cartesian coordinates is:
\[
   \frac{\partial^{2} u}{\partial x^{2}} +
   \frac{\partial^{2} u}{\partial y^{2}} = 0
\]
Now assume we want to obtain the polar coordinate form of Laplace equation.
The change of variables is:
\[
   x = r \cos \theta, {\;\;\;\;\;\;\;\;\;\;}  y = r \sin \theta
\]
The solution using {\tt CHANGEVAR} is
\begin{verbatim}
CHANGEVAR({u},{r,theta},{x=r*cos theta,y=r*sin theta},
                       {df(u(x,y),x,2)+df(u(x,y),y,2)} );
\end{verbatim}

Here we could omit the curly braces in the first and last arguments (because
those lists have only one member) and the curly braces in the third argument
(because they are optional), but not in the second.  So one could
equivalently write 
\begin{verbatim}
CHANGEVAR(u,{r,theta},x=r*cos theta,y=r*sin theta,
                     df(u(x,y),x,2)+df(u(x,y),y,2) );
\end{verbatim}

The {\tt u(x,y)} operator will be changed to {\tt u(r,theta)} in the
result as one would do with pencil and paper. {\tt u(r,theta)}
represents the  the transformed dependent variable.



REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]