Smbolic integration error with piecewise function of two variables.
2 views (last 30 days)
Show older comments
Consider the following toy problem in MuPAD:
assume(x in R_): assume(y in R_):
px := piecewise([x>5,a],[x<=5,b]):
py := piecewise([y>7,c],[y<=7,d]):
pxpy := px*py
The function pxpy is accurately computed. However, the following line gives undefined:
pxx := int(pxpy,y=-10..10)
whereas the answer should be
3*a*c + 17*a*d if x>5
3*b*c + 17*b*d if x<=5
Also, the following works, but I don't want to do this manually.
pxx1 := int(pxy,y=-10..10) assuming x>5
pxx2 := int(pxy,y=-10..10) assuming x<=5
pxx := piecewise([x>5,pxx1],[x<=5,pxx2])
How can I solve this problem? Is this a bug?
0 Comments
Answers (0)
See Also
Categories
Find more on Special Values in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!