Solving a system of integro-differential equations

조회 수: 7 (최근 30일)
Shoubhanik
Shoubhanik 2023년 10월 20일
편집: Torsten 2023년 10월 25일
I have a system of integro-differential equations that I need to solve. I am having some trouble with it. The system is as below:
This is a complicated system, and I am struggling with how to tackle the integrals, mainly how to pass the previous values in a solver like ode23s. Please note that for the infinite sum, it is reasonable to truncate it after some terms (e.g. n=0 to 5) which would be decided by the user. Would appreciate help in solving this system.
  댓글 수: 3
Shoubhanik
Shoubhanik 2023년 10월 20일
Sorry, I should have been clearer. So it is possible to truncate the series upto finite terms. We can assume that the series is truncated after some number of terms, decided by the user.
Walter Roberson
Walter Roberson 2023년 10월 20일
Have you tried setting up the system symbolically, with some small fixed number of terms for the infinite series (for example, 5 terms to experiment with), and then following the steps shown in the first example for odeFunction and see if MATLAB is able to figure out what the resulting ode system should look like?

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

답변 (1개)

Torsten
Torsten 2023년 10월 20일
편집: Torsten 2023년 10월 20일
Define
dI_n / dt = P1*exp(-lambda_n^2*D_a*t) , I_n(0) = 0
as additional ODEs to be solved. Then
I_n = integral_{tau = 0}^{tau = t} P1(tau)*exp(-lambda_n(tau)^2*D_a*tau) dtau
  댓글 수: 2
Shoubhanik
Shoubhanik 2023년 10월 24일
What I really need is to pass the vector of past solutions of P1 and the times at which they were evaluated, for any time t. If I do as you suggested, does that not mean that I_n would actually be solved only for the current timestep, and not all past timesteps? Does solving the additional ODE reflect the dependence on all the timesteps till now? I am confused about that.
Is there ay way to pass the vectors of past values of P1, l, and t to my ode function, where I can then use a numerical integration to evaluate the integral?
Torsten
Torsten 2023년 10월 24일
편집: Torsten 2023년 10월 25일
If I do as you suggested, does that not mean that I_n would actually be solved only for the current timestep, and not all past timesteps?
I_n is computed by the additional ODE from t = 0 up to the time t in the upper limit of integration. And this value is needed to compute B_n(t) according to your formula.
Is there ay way to pass the vectors of past values of P1, l, and t to my ode function, where I can then use a numerical integration to evaluate the integral?
Why ? I_n , the value of the additional ODE function, is the value of the integral.
If
y(t) = integral_{s=0}^{s=t} g(s) ds,
then
dy/dt = g(t), y(0) = 0.
It's nothing but the fundamental theorem of calculus.

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

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by