[Date Index] [Thread Index] [Author Index]
Re: Integrating a Piecewise function four times but different results
This really seems like a bug. T he problem is on the integration of p2. If you first do the integration of p1 first and then substitute the values you get the correct answer. soln2[x_] = Integrate[Integrate[Integrate[Integrate[p1[x], x], x], x], x] + r*x^3 + s*x^2 + u*x + v /. wmax -> 1 /. L -> 1 Moreover, it gives the wrong answer because the function is defined piecewise. For instance, Integrate[Integrate[Integrate[Integrate[2 (1 - x), x], x], x], x] obviously gives the correct result.