Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
/*
 * This file:
 *   http://anggtwu.net/MAXIMA/changevarbyhand1.mac.html
 *   http://anggtwu.net/MAXIMA/changevarbyhand1.mac
 *          (find-angg "MAXIMA/changevarbyhand1.mac")
 * Author: Eduardo Ochs <eduardoochs@gmail.com>
 *
 * (defun e () (interactive) (find-angg "MAXIMA/changevarbyhand1.mac"))
 * (find-es "maxima" "changevar-quirk")
 * (find-es "maxima" "changevar-by-hand")
*/

changevar0_set (obody0,trans0,nvar0,ovar0) := (
  [obody,trans,nvar,ovar] : [obody0,trans0,nvar0,ovar0],
  oexpr : 'integrate(obody, ovar));

changevar0_byhand (obody0,trans0,nvar0,ovar0) := (
  changevar0_set(obody0,trans0,nvar0,ovar0),
  ovar_eq_tfun_nvar : solve(trans, ovar)[1],
  deriv : diff(rhs(solve(trans, nvar)[1]), ovar),
  nbody : subst(ovar_eq_tfun_nvar, obody/deriv),
  nexpr_by_hand : 'integrate(nbody, nvar),
  nexpr_maxima  : changevar(oexpr, trans, nvar, ovar),
  nexpr : nexpr_by_hand);

changevar0_maxima (obody0,trans0,nvar0,ovar0) := (
  changevar0_set(obody0,trans0,nvar0,ovar0),
  changevar(oexpr, trans, nvar, ovar));

changevar0_nop (obody0,trans0,nvar0,ovar0) := (
  changevar0_set(obody0,trans0,nvar0,ovar0),
  oexpr);

/*
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
** (find-angg "MAXIMA/changevarbyhand1.mac")
load       ("~/MAXIMA/changevarbyhand1.mac");

changevar0_nop    (sin(x^2)*2*x, u=x^2, u, x);
changevar0_maxima (sin(x^2)*2*x, u=x^2, u, x);
changevar0_byhand (sin(x^2)*2*x, u=x^2, u, x);
changevar0_maxima (sin(x^2)*2*x, x^2=u, u, x);
changevar0_byhand (sin(x^2)*2*x, x^2=u, u, x);

changevar0_maxima (sqrt(4-x^2)^3, x=2*u, u, x);
changevar0_byhand (sqrt(4-x^2)^3, x=2*u, u, x);
oexpr;
nexpr;

*/






/*
 * Local Variables:
 * coding:  utf-8-unix
 * End:
*/