# Double integration with respect to same variable in defiinte range

조회 수: 4 (최근 30일)
Godas Srikar 2020년 1월 2일
댓글: Godas Srikar 2020년 1월 26일
How to double integrate an expression with same variable numerically(using Simson's rule) for example we have a function acceleration A=t*sint for t ranging from 0 to 1sec, how to find displacement by numerically integrating the function twice with respect to t.

댓글을 달려면 로그인하십시오.

### 채택된 답변

Rajat Tewari 2020년 1월 8일
편집: Rajat Tewari 2020년 1월 8일
Hi Godas,
The solution to this problem can be achieved in 2 ways:
If you have Symbolic Toolbox, you can do this easily:
>> syms t;
>> f = t*sin(t);
>> result = int( int(f), [0 1])
>> vpa(result)
If you do not have symbolic toolbox, this can be done in following way:
>> format long
>> f = @(x,t) t.*sin(t)
>> y2 = @(x) x;
>> result = integral2(f2,0,1,0,y2);
Important Note: In second method, as you can see that I have put the lower limit of inside integral as 0 which is working for this case but if the result of first integral yields then it will become 1. Similarly, if it yields , then you have to use . Keep this in mind.
Hope it helps
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Godas Srikar 2020년 1월 26일
Mr Tewari
Thank you

댓글을 달려면 로그인하십시오.

### 카테고리

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

### Community Treasure Hunt

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

Start Hunting!

Translated by