From: SourceForge.net <no...@so...> - 2009-02-14 15:35:20
|
Bugs item #2588816, was opened at 2009-02-11 12:39 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2588816&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Barton Willis (willisbl) Assigned to: Nobody/Anonymous (nobody) Summary: exp doesn't taylorize Initial Comment: exp(taylor polynomial) --/--> taylor polynomial: (%i5) exp(taylor(x,x,0,3)); (%o5) %e^x Some powers do taylorize: (%i6) (1 + taylor(x,x,0,3))^(3/8); (%o6) 1+(3*x)/8-(15*x^2)/128+(65*x^3)/1024+... ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2009-02-14 16:35 Message: Code to handle a taylor expansion as argument to the function exp() has been added. This code has been added to the existing function simpexp in file simp.lisp. Now Maxima gets: (%i41) exp(taylor(x,x,0,3)); (%o41) 1+x+x^2/2+x^3/6 /* with linear display the continuation is not shown */ No more changes. The handling of noun/verb expressions is still inconsistent. Examples: (%i43) 'exp(1.0); (%o43) 'exp(1.0) /* Does not evaluate as expected */ (%i42) 'exp(taylor(x,x,0,3)); (%o42) 'exp(x) /* Does not taylorize correctly */ The original bug is fixed. Closing this bug report. Dieter Kaiser ---------------------------------------------------------------------- Comment By: Dieter Kaiser (crategus) Date: 2009-02-11 18:05 Message: This could be the code to handle noun/verb properties more consistent. This code includes the handling of a taylor expansion as argument: (defmfun $exp (x) ;; Do not simplify. ;; There are tests which depend on an unsimplified ;; verb expression. (list '(mexpt) '$%e x)) (defprop %exp simp-exp operators) (defprop $exp %exp alias) (defprop %exp $exp reversealias) (defun simp-exp (x y z) (oneargcheck x) (setq y (simpcheck (cadr x) z)) (cond (($taylorp (second x)) ;; taylorize exp(taylor(...)) (return-from simp-exp (meval (list '($taylor) (list '(mexpt) '$%e ($ratdisrep (second x))) (cadr ($taylorinfo (second x))))))) (t (simplifya (list '(mexpt) '$%e y) z)))) This could be the results for %e^taylor(x,x,0,5) and exp(taylor,x,x,0,5): (%i10) %e^(taylor(x,x,0,5)); (%o10) 1+x+x^2/2+x^3/6+x^4/24+x^5/120 (%i11) exp(taylor(x,x,0,5)); (%o11) 1+x+x^2/2+x^3/6+x^4/24+x^5/120 Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2588816&group_id=4933 |