Numerical integration of an ODE?
조회 수: 13 (최근 30일)
이전 댓글 표시
Hey! I'm trying to integrate the following 2nd order ODE:
from time t=0 to any random time, say t=50 seconds
ω and A are constants.
I need to integrate the above equation twice, numerically. Any idea how i can do this and what method i'll be using?
thanks
댓글 수: 2
riccardo
2020년 11월 16일
Why numerically ?
If A and w are constants, x(t) = A*sin(w*t) is surely the primitive (plus initial conditions if not zero).
답변 (1개)
Priyanka Rai
2020년 11월 18일
To be able to integrate 2nd Order ODE numerically you can use the following methods, based on your use case:
- If function f is to be integrated, then for definite integral you can use
int(f, a, b)
2. Numerically evaluate double integral
q = integral2(fun,xmin,xmax,ymin,ymax)
approximates the integral of the function z = fun(x,y) over the planar region xmin ≤ x ≤ xmax and ymin(x) ≤ y ≤ ymax(x).
Numerical integration functions can approximate the value of an integral whether or not the functional expression is known.When you know how to evaluate the function, you can use integral to calculate integrals with specified bounds.
You can refer to this blog for more information as well: https://blogs.mathworks.com/loren/2014/02/12/double-integra tion-in-matlab-methods-and-handling-discontinuities-singularities-and-more/
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!