필터 지우기
필터 지우기

Solving a system of integral equations self-consistently

조회 수: 8 (최근 30일)
SACHIN VERMA
SACHIN VERMA 2020년 11월 13일
편집: SACHIN VERMA 2020년 11월 13일
Hi I have four integral equations with four unknowns I need to solve these equations self-consistently. Previously I solved two integral equations self-consistently in matlab and now trying solve four or multiple integral equations. The four sample equations with unknowns a,b,c and d are attached below. I don't need a complete code but a rough idea how solve such system of equations. (Note that the equations attached are not actual complex equations which I need to solve but these simpler equations gives an idea of the problem) Any help would be appreciated! Thanks

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2020년 11월 13일
Why doesn't your solution to two (I assume similar) integral equations work for this case?
Here's a QD-cookup (that doesn't work too well for your possibly illposed example):
% Integration-function, ought to be adaptible, doesn't work too well in this example
Q1 = @(pars) integral(@(x) (pars(1)*x+pars(2))./(pars(3)*x+pars(4)),-inf,0);
% Sum-of-squared residuals function:
errfcn = @(pars) ( (pars(1) -Q1(pars([3 2 1 4])) )^2 + ...
(pars(2) -Q1(pars([1 4 2 3])) )^2 + ...
(pars(3) -Q1(pars([2 4 3 1])) )^2 + ...
(pars(4) -Q1(pars([1 2 4 3])) )^2 );
% Residual-function:
resfcn = @(pars) [(pars(1) -Q1(pars([3 2 1 4])) );
(pars(2) -Q1(pars([1 4 2 3])) );
(pars(3) -Q1(pars([2 4 3 1])) );
(pars(4) -Q1(pars([1 2 4 3])) )];
% Solution with fmnisearch:
par1 = fminsearch(@(pars) errfcn(pars),[1 1 1 1]);
% Solution with lsqnonlin:
par2 = lsqnonlin(@(pars) resfcn(pars),[1 1 1 1],[0 0 0 0],1e12*[1 1 1 1]);
Hopefully your integrals are at least nicely behaved enough that there are parameters that makes them all converge over the integration intervall.
HTH
  댓글 수: 3
SACHIN VERMA
SACHIN VERMA 2020년 11월 13일
편집: SACHIN VERMA 2020년 11월 13일
sorry for wrong equations. These are only sample equation as actual equation is quite complicated. I think Changing the limit from 0-1 fix the problem. I only need rough idea that how to solve four self-consistent integral equations in matlab. I have done it for two equations already by applying iterration.
SACHIN VERMA
SACHIN VERMA 2020년 11월 13일
편집: SACHIN VERMA 2020년 11월 13일
Bjorn Gustavsson thanks for the answer your code works well for any finite limit. I solved two equations iteratively but i don't know how to iterate four equations. I will try to solve the actual equations by using above code.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by