From: Barton W. <wi...@un...> - 2024-03-15 17:41:04
|
Hi Eric, Thanks for alerting us of these bugs. I've rarely (never?) used this package, so maybe I'm not the best to reply. One quick observation is that with or without abs_integrate, the result is the same. Right? Glancing at the source code, I see a deeply nested function adefint. My guess is that its functionality (if any) should be blended in with the generic definite integration code? Plus, the functions remfun2 and remfunn2 seem like they shouldn't be needed—they do things that the general simplifier should be doing? Maybe you could file a bug report? I know it's a nuisance to create an account to do so, but so it goes. --Barton ________________________________ From: Majzoub, Eric <eri...@um...> Sent: Thursday, March 14, 2024 15:35 To: max...@li... <max...@li...> Subject: [Maxima-discuss] fourie.mac package fails for simple square wave Caution: Non-NU Email Hi All. I ran into a problem calculating fourier coefficients for a simple square wave. Define a square wave, odd about the origin: f(x) := 2*unit_step(x) -1 ; load(abs_integrate); load(fourie); foursimp( fourier(f(x),x,1) ); # calculate it on the interval (-1,1). This gives zeros for all the coefficients. The problem seems to be with the behavior of the unit_step() function. (%i33) oddfunp(f(x),x); (%o33) false Tracing the call gives: 1 Enter oddfunp [- 1 + 2 unit_step(x), x] 1 Enter equalp [- 1 + 2 unit_step(x), 1 - 2 unit_step(- x)] 1 Exit equalp false I don't know where this is best fixed. In the fourie.mac code? PS. Note that there is another package on github called "pdefourier" that can use the f(x) defined above and returns the correct answer, also using abs_integrate. -Eric _______________________________________________ Maxima-discuss mailing list Max...@li... https://lists.sourceforge.net/lists/listinfo/maxima-discuss |