Question: MENTAL BLOCK: Integration conflict

This should be a simple problem, but I am having trouble resolving a contradiction in integral evaluation that is included in the results below.  Instead of butting my head further perhaps someone can point out my probable error.

You will see in both cases I have a triangle signal with a slope of (-1).  However in the 2nd case I have linked the period T to the slope parameter alpha.  If I assign alpha=1 then the results of the 2 integrals should = 1/4, but the 2nd one does not.

Appreciate any feedback.


 

plot(piecewise(-1 < x and x < 0, 0, 0 < x and x < 1, 1-x), x = -2 .. 2, linestyle = solid, thickness = 5, scaling = constrained, title = "Asymmetric Triangle Wave", titlefont = [COURIER, 18])

 

n := 0; 1; T := 2; 1; a[0] := (int(0*exp(-I*(2*Pi*n*t/T)), t = -(1/2)*T .. 0)+int((1-t)*exp(-I*(2*Pi*n*t/T)), t = 0 .. (1/2)*T))/T

1/4

(1)

restart

alpha := 1; T := 2/alpha; plot(piecewise(x < 0, 0, 0 < x and x < (1/2)*T, -alpha*x+1), x = -T .. T, linestyle = solid, thickness = 5, scaling = constrained, title = "Asymmetric Triangle Wave", titlefont = [COURIER, 18])

 

  n=0 term:n := 0; 1; alpha := 1; 1; T := 2; 1; a[0] := (int(0*exp(-I*(2*Pi*n*t/T)), t = -(1/2)*T .. 0)+int((1-alpha*T)*exp(-I*(2*Pi*n*t/T)), t = 0 .. (1/2)*T))/T

-1/2

(2)

``


 

Download integral_contradiction.mw

Please Wait...