Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
/* * This file: * http://anggtwu.net/MAXIMA/gabmv1.mac.html * http://anggtwu.net/MAXIMA/gabmv1.mac * (find-angg "MAXIMA/gabmv1.mac") * Author: Eduardo Ochs <eduardoochs@gmail.com> * * Gabarito pra questões de mudança de variável. * * Used by: * (find-esgrep "grep --color=auto -nH --null -e gabmv1.mac maxima.e") * (find-es "maxima" "miranda-p191") * * (defun e () (interactive) (find-angg "MAXIMA/gabmv1.mac")) */ newvaroldvar(chvar) := [lhs(chvar), listofvars(rhs(chvar))[1]]$ lfv_solve(label,f, var) := [label, 'integrate(f,var), "=", integrate(f,var)]$ lfc_solve(label,f,chvar) := block([newvar,oldvar], [newvar,oldvar] : newvaroldvar(chvar), lfv_solve(label,f,oldvar))$ lfc_change(label,f,chvar) := block([newvar,oldvar,intf,intg], [newvar,oldvar] : newvaroldvar(chvar), intf : 'integrate(f,oldvar), intg : changevar(intf, chvar, newvar, oldvar), [label, intf, "=", intg, "", chvar])$ lfv_solve1 (item) := apply('lfv_solve, item)$ lfc_solve1 (item) := apply('lfc_solve, item)$ lfc_change1 (item) := apply('lfc_change, item)$ lfv_solve_m (items) := apply('matrix, map('lfv_solve1, items))$ lfc_solve_m (items) := apply('matrix, map('lfc_solve1, items))$ lfc_change_m(items) := apply('matrix, map('lfc_change1, items)); /* * (eepitch-maxima) * (eepitch-kill) * (eepitch-maxima) load("~/MAXIMA/gabmv1.mac")$ lfv_solve ("3.", x^2*sqrt(x^3+1), x); lfc_solve ("3.", x^2*sqrt(x^3+1), u=x^3); lfc_change("3.", x^2*sqrt(x^3+1), u=x^3); lfv_solve1 (["3.", x^2*sqrt(x^3+1), x]); lfc_solve1 (["3.", x^2*sqrt(x^3+1), u=x^3]); lfc_change1(["3.", x^2*sqrt(x^3+1), u=x^3]); items : [ ["1.", cos(3*x), u=3*x], ["2.", x*(4+x^2)^10, u=4+x^2], ["3.", x^2*sqrt(x^3+1), u=x^3], ["4.", 1/(1-6*t)^4, u=1-6*t], ["5.", cos(th)^3*sin(th), u=cos(th)], ["6.", sec(1/x)^2/x^2, u=1/x] ]$ lfc_solve_m (items); lfc_change_m(items); */ /* * Local Variables: * coding: utf-8-unix * End: */