On Sept. 05, 2008, Raymond Toy wrote:
>> but direct use of integrate adds "ind" to the
>> correct answer.
>>
>> (%i7) integrate(x*exp(-a*x)*cos( w*x), x, 0, inf);
>> (%o7) ind - (w^2 - a^2)/(w^4 + 2*a^2*w^2 + a^4)
>>
>> Is this a bug?
>>
>> Yes this is a bug.
>
> Ray
>
Since maxima can find the indefinite integral, this
must be a limit(...) bug:
(%i2) assume( a > 0, w > 0 )$
(%i3) indef : integrate( x*exp( - a*x)*cos(w*x), x);
(%o3) %e^-(a*x)*(((w^3+a^2*w)*x+2*a*w)*sin(w*x)
+((-a*w^2-a^3)*x+w^2-a^2)*cos(w*x))
/(w^4+2*a^2*w^2+a^4)
(%i4) nindef : num( indef);
(%o4) %e^-(a*x)*(((w^3+a^2*w)*x+2*a*w)*sin(w*x)
+((-a*w^2-a^3)*x+w^2-a^2)*cos(w*x))
(%i5) coeff( nindef, exp( - a*x) );
(%o5) ((w^3+a^2*w)*x+2*a*w)*sin(w*x)+((-a*w^2-a^3)*x+w^2-a^2)*cos(w*x)
(%i6) limit(nindef, x, 0, plus);
(%o6) w^2-a^2
(%i7) limit(nindef, x, inf );
(%o7) ind
limit(..) makes use of assume(..) info to get:
(%i8) limit ( exp( -a*x), x, inf );
(%o8) 0
(%i9) limit( exp( -a*x)*cos( w*x), x, inf );
(%o9) 0
(%i10) limit( x*exp( -a*x)*cos( w*x), x, inf );
(%o10) 0
So what is the problem with this "indef" expr?
Ted Woollett