ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 16 Jan 2021 15:57:53 +0100Integration of multivariable piecewise function in SageMathhttps://ask.sagemath.org/question/55306/integration-of-multivariable-piecewise-function-in-sagemath/ I have a problem that can be simplified as below:
g(w) = piecewise([[[0, 3], (w-3)^2], [(3, infinity), 0]])
f(w,t) = g*cos(w*t) # t >= 0
#assume(t, 'real')
h = integral(f, w, 0, 10); h
> Out: t |--> undef
If I do not use piecewise, and integrate only up to w = 3 (where I know g becomes zero), then I obtain the wanted solution:
g2(w) = (w-3)^2
f2(w, t) = g2*cos(w*t)
h2 = integral(f2, w, 0, 3); h2
> Out: t |--> 6/t^2 - 2*sin(3*t)/t^3
How can I integrate f(w, t) defining g(w) piece-wisely (or equivalent)?J. SerraSat, 16 Jan 2021 15:57:53 +0100https://ask.sagemath.org/question/55306/