(no subject)



;; this allow the change of variables:
;; integrate(f(z(y))*diff(z(y),y),y)  ----->  integrate(f(z),z)  


(defun $changeux(ex var)
  (let (l   $ux u-x d-u-x x-1  $e1 $re)
    (unless (and (consp ex) (consp (car ex))  (eq (caar ex) 'mtimes)) (return-from $changeux (list '(mlist simp) ex var)))
    (setq l (remove-if-not (lambda(x) (and (consp x) (consp (car x))  (eq  '%derivative (caar x)))) ex))
    (when (> (length l) 1) (return-from $changeux (list '(mlist simp) ex var))) 
    (setq x-1 (cdr (cdar l)))
    (setq d-u-x (car l))
    (setq u-x (second d-u-x))
    (unless  (and (equal x-1 (list var 1)) (eq (second u-x) var)) (return-from $changeux (list '(mlist simp) ex var)))
    (setq $ux (second d-u-x))  
    (setq $e1 (remove d-u-x ex :test #'equal)) 
    (setq $re (subst (caar $ux) $ux $e1 :test #'equal))
    (if ($freeof var $re) (list '(mlist simp)   $re (caar $ux))
      (list '(mlist simp) ex var)))
) 
  
; we need to define in maxima this 

;           integrateux(exp,var):=apply(integrate,changeux(exp,var))


;example:   integrateux(y^3,y);
;example:   integrateux(v(y)/(v(y)+1)*diff(v(y),y),y);


       
---------------------------------

S? un Mejor Amante del Cine
?Quieres saber c?mo? ?Deja que otras personas te ayuden!.