Tag Info

New answers tagged

2

A fix For s, you could use s = x \[Function] Piecewise[{{Cos[x], -Pi/2 <= Mod[x, 2 π, -π] <= Pi/2}}]; Integrate[s[t], {t, -8, 6}] (* 5 + Sin[6] *) The problem The problem with the original ff and s is that the function calls itself. Now consider ff[t] or s[t]. None of the conditions will evaluate to False so "the Piecewise function is returned ...


1

You could define your function as f[x_] := 2 Mod[x, 1] then Integrate[f[x], {x, 0, 5}] yields 5 (as expect 5 triangles of area 1) To plot: Plot[f[x], {x, -4, 4}, Exclusions -> None]



Top 50 recent answers are included