From: Michel T. <ta...@lp...> - 2022-12-05 08:48:59
|
(%i1) declare(integrate,linear); (%o1) done (%i2) integrate(a(x)+b(x),x); / / [ [ (%o2) I b(x) dx + I a(x) dx ] ] / / (%i3) (%i3) subst(A, 'integrate(a(x),x),%); / [ (%o3) I b(x) dx + A ] / (%i4) Le 05/12/2022 à 07:52, J. Milgram a écrit : > > > Greetings all. > > Simple question but I'm stumped. I'm integrating a sum of undefined > functions: > > integrate(a(x)+b(x),x); > > I get the noun form of the integral: > > (%i17) integrate(a(x)+b(x),x); > / > [ > (%o17) I (b(x) + a(x)) dx > ] > / > > > So far so good. > > Now I want to introduce definitions for the integrals: > integrate(b(x),x) == B, and integrate(a(x),x) == A. > > How do I do this, and end up simply with A + B ? > > Part of this might be breaking up the integral of the sum into a sum > of integrals. Then I'm pretty sure I can do > > subst(A,'integrate(a(x),x),%); > > and then same for B. > > thanks for any ideas and apologies if this is in the manual. I > couldn't find it. > > Judah > > -- Michel Talon |