16 views (last 30 days)

Bjorn Gustavsson
on 13 Nov 2020

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

Bruno Luong
on 13 Nov 2020

These equation does not make sense.

In order for

int (c*x+b)/(a*x+d)

to converge at -inf; the, limits must be 0, meaning c/a is 0 so c==0. So the indefinite integral is 1/a*log(..), and it diverges.

These integrals you write has no limiting value. Period. No need to write an equation involving something that is not defined.

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

Start Hunting!
## 0 Comments

Sign in to comment.