Numerical integration of an ODE?

17 views (last 30 days)
KLETECH MOTORSPORTS
KLETECH MOTORSPORTS on 14 Nov 2020
Answered: Priyanka Rai on 18 Nov 2020
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 Comments
riccardo
riccardo on 16 Nov 2020
Why numerically ?
If A and w are constants, x(t) = A*sin(w*t) is surely the primitive (plus initial conditions if not zero).

Sign in to comment.

Answers (1)

Priyanka Rai
Priyanka Rai on 18 Nov 2020
To be able to integrate 2 nd Order ODE numerically you can use the following methods, based on your use case:
  1. If functionfis to be integrated, then for definite integral you can use
int(f, a, b)
2. Numerically evaluate double integral
q = integral2(乐趣、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.

Community Treasure Hunt

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

Start Hunting!