Reducing or simplifying the **symbolic** product of two integrals

조회 수: 3 (최근 30일)
Michele Giugliano
Michele Giugliano 2014년 7월 29일
답변: Christopher Creutzig 2014년 9월 4일
I wish using the Symbolic toolbox to guide me in rather simple but tedious work. Part of the formulae I deal with includes the square of a generic integral (or the product of two integrals):
syms t xi h(t) a = int(h(xi), xi, 0, t) pretty(a*a)
QUESTION: Is there any command that I can use to have MATLAB deriving the following expansion (where eta is a symbolic variable of course)
int(int(h(xi), xi, 0, t) * h(eta), eta, 0, t)
i.e., automatically recognising that the product of the above integrals is the double/iterated integral of the product??
That would simplify greatly my life! Without it I am frustrated and resorted to paper and pen: I must in fact anyway evaluate the expected value of the generic quantities h(xi) as random variables and having MATLAB just simplifying the expression a tiny bit would have helped.
Tnx!

답변 (1개)

Christopher Creutzig
Christopher Creutzig 2014년 9월 4일
What simplify currently cannot do is to rename your bound variable eta to xi at the right time. You may need to explicitly tell it to do so; assuming you only have eta as a bound variable (such that it can be renamed at will wherever it appears), the following may help:
>> syms h(xi) eta t
>> a = int(h(xi), xi, 0, t)^2 - int(int(h(xi), xi, 0, t) * h(eta), eta, 0, t);
>> subs(expand(a), eta, xi)
ans =
0

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by