numerical double integration symbolically and numerically

3 ビュー (過去 30 日間)
R yan
R yan 2014 年 8 月 9 日
編集済み: Roger Stafford 2014 年 8 月 9 日
Hi,
I am trying to evaluate a double integral Int1 Int2 f(x,t) dt dx. I want to evaluate the t-integral symbolically and the x-integral numerically.
Any suggestion how to implement.
thanks

回答 (2 件)

Roger Stafford
Roger Stafford 2014 年 8 月 9 日
編集済み: Roger Stafford 2014 年 8 月 9 日
The part of what you propose, R yan, that is not certain of success is whether matlab can succeed in finding a symbolic expression for the inner integral, int(f(x,t),t). That is anything but certain. Many functions cause 'int' to fail to find an explicit solution.
If it does find an explicit solution, that solution will depend only on x provided you have given limits of integration to the variable t, so it should be possible to do numerical integration with it provided there are no problems of singularities or divergence.
However, matlab does have functions that can compute double integrals numerically, in case your inner integration fails symbolically.

Star Strider
Star Strider 2014 年 8 月 9 日
It depends on the function and would only work if you can eliminate t in the symbolic integration, so that the resulting function is only a function of x, and a relatively uncomplicated one at that.
Then use matlabFunction to create an anonymous function from that result as a function of x and do the numerical integration with integral.
It’s possible, but no promises that it will be successful.

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by