- #1
gfd43tg
Gold Member
- 950
- 50
This is a part MATLAB and part math question. I know for the shaded region, I would usually do
##A_{shaded} = \int_{inter(2)}^{inter(3)} f_{1}(x) \mathrm{d}x - \int_{inter(2)}^{inter(3)} f_{2}(x) \mathrm{d}x##
However, since it appears they want the function handle to be just one line, am I allowed to do
Code:
fh = @(x) -0.1*x.^3 - 0.5*x.^2 - 2.2*x + 9
Since I can't make two integrals and just subtract them?
In other words, would it be correct to say
##A_{shaded} = \int_{inter(2)}^{inter(3)} (f_{1}(x)-f_{2}(x)) \mathrm{d}x##?
Last edited: