From: Dan G. <dg...@us...> - 2012-07-03 18:51:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima, A Computer Algebra System". The branch, master has been updated via 69dc6a3538e31683519bbcbeb8e1d71feaead661 (commit) from d7285090062776ab70033ec444a5d608f3965522 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 69dc6a3538e31683519bbcbeb8e1d71feaead661 Author: Dan Gildea <dgildea> Date: Tue Jul 3 14:51:22 2012 -0400 Fix Wrong result for definite integral - ID: 3538167 src/limit.lisp: o calculate-series: Generate $lhospitallim terms of taylor expansion. Ideally we would use a lazy series representation that generates more terms as higher order terms cancel. tests/rtestint.mac: o add integrate(cos(3*x)/(5-4*cos(x)),x,0,2*%pi); diff --git a/src/limit.lisp b/src/limit.lisp index 4bf4ced..e133abc 100644 --- a/src/limit.lisp +++ b/src/limit.lisp @@ -3051,10 +3051,13 @@ It appears in LIMIT and DEFINT.......") exp) exp))) +;; Generate $lhospitallim terms of taylor expansion. +;; Ideally we would use a lazy series representation that generates +;; more terms as higher order terms cancel. (defun calculate-series (exp var) (assume `((mgreaterp) ,var 0)) (putprop var t 'internal);; keep var from appearing in questions to user - (let ((series ($taylor exp var 0 2))) + (let ((series ($taylor exp var 0 $lhospitallim))) (forget `((mgreaterp) ,var 0)) series)) diff --git a/tests/rtestint.mac b/tests/rtestint.mac index 1a44c9b..60da261 100644 --- a/tests/rtestint.mac +++ b/tests/rtestint.mac @@ -1436,3 +1436,7 @@ sqrt(107669)*%i*log(2*sqrt(107669)*%i) /* integrate erf fails - ID: 3454370 */ integrate( erf(x+a)-erf(x-a), x, minf, inf); 4*a; + +/* Wrong result for definite integral - ID: 3538167 */ +integrate(cos(3*x)/(5-4*cos(x)),x,0,2*%pi); +%pi/12; ----------------------------------------------------------------------- Summary of changes: src/limit.lisp | 5 ++++- tests/rtestint.mac | 4 ++++ 2 files changed, 8 insertions(+), 1 deletions(-) hooks/post-receive -- Maxima, A Computer Algebra System |