integrate(sin(n*x)*cos(2*n*x),x) is wrong
integrate(sin(m*x)*sin(n*x), x, 0, 2*%pi) unconditionally zero
integrate(sin(m*x)*sin(n*x), x, 0, 2*%pi) unconditionally zero
Fixed in [0ff2b7e1cb4b4c3c91f9a623d2e014bfd4aaee2b] We ask the user if n=m before returning a result.
I think the issue comes from monstertrig with these lines: ;; We have a*sin(m*x)*sin(n*x). ;; The integral is: a*(sin((m-n)*x)/(2*(m-n))-sin((m+n)*x)/(2*(m+n)) (return (subliss y '((mtimes) a ((mplus) ((mquotient) ((%sin) ((mtimes) ((mplus) m ((mtimes) -1 n)) x)) ((mtimes) 2 ((mplus) m ((mtimes) -1 n)))) ((mtimes) -1 ((mquotient) ((%sin) ((mtimes) ((mplus) m n) x)) ((mtimes) 2 ((mplus) m n))))))) I think we need to ask if n=m here.
Merge branch 'issue-4265-integrate-sin-cos-askequal'
Remove debugging print and update comments.
Fix up abs_integrate test due to fixing bug 4265
Fix #4257: Remove code applying the subst y=c*x+b
Don't check to see if abs_integrate is loaded.
Fix #4265: integrate(sin(n*x)*sin(m*x),x,0,2*%pi) is always 0
Fix #4257: Remove code applying the subst y=c*x+b
First, I think the example using limit works, because integrate sees sin(n*x)^2, so that naturally works. Given how maxima works, presumably, the approach would be to ask if n = m, or, more likely if n-m is zero or non-zero.
Is the intent to throw an error if the (either) arg is a list? What about other things like gcd(a=b, c=d)? Or gcd(matrix([1]), matrix([2])). Presumably these are all errors. What are the valid types for the args of gcd?
Perhaps it's the mterpri call in output-linear-one-line in "displa.lisp". I commented out the call and your "~m" example prints "12345". But if I try printf(true, "~M~%", i), no new line is printed either. I guess whatever handles "~%" really need to force a new line. I didn't look into that.
Warnings about texi source from texinfo 7.1
The current released version of texinfo is now 7.1. I do see warnings. Some are from the translations. But for the English manual, I see things like: MathFunctions.texi:2992: warning: @ref should not appear on @item line (possibly involving @mref) ... grobner.texi:470: warning: @noindent is useless inside of a paragraph There are a lot of warnings about @ref in @item lines.
Heh. I was surprised to see that gcd needed single quote. If you leave it off, you get something like spmod(10,6). Then I remembered that gcd also names a variable whose default value is spmod. I think the documentation could be improved so that the functions gcd and the variable gcd had different entries. Now you have to get to the second paragraph after a long first paragraph to find out abou the variable.
Good point. If I ever get around to updating the bug numbers, I'll use a URL.
Incorrect change of variable in integral involving diff
Fixed in [63b1b1d7124cb5d5441023d7417fcc351f88bc24] We basically removed the old substitution code that doesn't seem to be needed anymore. And added a simple test for this.
Fix #4257: Remove code applying the subst y=c*x+b
Update old bug numbers to new bug numbers
changevar of integrand containing diff is wrong
Oh, I didn't know you could still get the old bug number. There are quite a few places in the code (and tests) that reference the old bug numbers. These should be fixed. And maybe a link instead of just listing a bug number.
If I comment out the when block at the beginning of monstertrig, this integral now just returns the nounform. And the comment about integrals of x*sin(n*x) taking longer and longer doesn't seem to be true anymore. The commit log for [4c9c1e] says [ 1631094 ] integrate(sin(n*x)*x, x) => linear time when n is an integer Add a special case to MONSTERTRIG to match nx+b where n is a number and b is free of x. We use the substitution y = nx+b to evaluate the integral. I tried with n=10 and100, which take...
Probably caused by [4c9c1efb86] from me from 2007-01-19 where we have this bit fo code that does the substitution in monstertrig: (let ((arg (simple-trig-arg trigarg var2))) (cond (arg ;; We have trig(c*x+b). Use the substitution y=c*x+b to ;; try to compute the integral. Why? Because x*sin(n*x) ;; takes longer and longer as n gets larger and larger. ;; This is caused by the Risch integrator. This is a ;; work-around for this issue. (let* ((c (cdras 'c arg)) (b (cdras 'b arg)) (new-var (gensym "NEW-VAR-"))...
Oh, wait. This might be older than that. Maxima 5.45.1 produces the same thing.
This is probably something I did while trying to remove/reduce the number of special variables.
Fix error in previous commit confusing pl and pl*
Rename p* and pe* to pp and pe
Make p* and pe* lexicals
Remove special decls for pl*, rl*, pl*1, rl*1
Make pl*, rl*, pl*1, rl*1 lexicals
Remove nil'ed out declaration of factors.
Make factors a lexical variable
Rename plm* to plm and remove special declarations
Make plm* a lexical instead of special
Rename rlm* and remove special declaration
Remove special declaration for $exptsubst
Remove special declarations of `sn*` and `sd*`
Make rlm* lexical
Make sn*/sd* lexical instead of special
Minor refactoring on how updn is set
Rename *updn to updn
Add short comment on computing updn value
Make *updn lexical
Rename leadcoef and add to globals.lisp
Remove declare-top for *checkfactors*
Rename loopstop* and make it a defvar
Remove old decl of *zd* and incorrect comments
Make *zd* lexical instead of special
Make *i* and *j* into lexicals
Merge branch 'rtoy-refactor-specvars-defint-var-2'
Remove unused replacement code
Implement res-var
Implement residue-var
Implement res1-var
Implement resprog0-var, resprog0 with explicit var
Implement polelist-var to have explicit dependency on var
Implement deg-var that makes the dependency on var explicit.
Add some comments to the new functions
Implement no-err-sub-var that makes the dependency on var explicit.
Implement snumden-var.
More updates for replacements in defint
Rename polyp2 to polyp-var
Add comment about notinvolve
Fix typo: nli -> nil
Properly implement replacements to make dependency explicit
Remove declare-top declaration for var
Merge branch 'master' into rtoy-refactor-specvars-defint-var
Merge branch 'master' into rtoy-refactor-specvars-defint-var
Fix expected TeX output of hypergeometric function
Replace simpexpt with just power
Some minor indentation fix and refactoring.
Merge branch 'master' into rtoy-refactor-specvars-defint-var
plog returns unsimplfied results
Fixed by commit [48f632e9b3e725feba26687d08ac2e1fe91813a3] Closing.
Remove debugging prints
Fix #4254: plog returns unsimplified answers
Some more examples: assume(xp>0); plog(-xp) => log(- 1 (- xp)) + %i %pi plog(xp*%i) => log(1*xp)+(%i*%pi)/2 plog(-xp*%i) => log(-1*(-xp))-(%i*%pi)/2
Fix compiler warning about unknown variable VAR
Add comment about using var in plog
Add some comments on plog usage without binding var
plog returns unsimplfied results
Bind var for plog in ztorat
Bind var for plog in ztorat
Merge branch 'rtoy-refactor-specvars-defint-var' into rtoy-refactor-specvars-defint-var-method-by-limits
Revert changes that added bindings of var
Rename var to ivar in method-by-limits
Merge branch 'rtoy-refactor-specvars-defint-var' into rtoy-refactor-specvars-defint-var-method-by-limits
Bind var in ztoinf instead of before calling ztoinf
Bind var before calling mtoinf and ztoinf
Remove accidental binding of var in ztorat
Add replacement for polyp that refs specvar var
Add replacement for res1 that refs specvar var
Add replacement for deg that refs specvar var
Rename var to ivar in method-by-limits
Add replacement for residue that refs specvar var