equation with parametric integrand
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a function f(x) depending on two parameters and a function z(x) not depending on any parameter a and b. I have to find the values of these two parameters. I have two equations in which f(x) is involved.
the first: integral between 0.5 and 1 of f(x) in dx is 0.62
the second: integral of f(x)*z(x) between 0 and 0.55 equal to 0.24.
I cannot implement a code able to compute the values of a and b.
How is it possible to find values of parameters of an integrand? are there any available code?
so far I tried a minimization approach but results are not satisfying.
thanks in advance
2 Commenti
Walter Roberson
il 12 Nov 2016
Modificato: Walter Roberson
il 12 Nov 2016
Are f and z known functions? If they are not, then NO, there is no hope of finding the parameters. If they are known, we need to see them.
Risposte (2)
John D'Errico
il 12 Nov 2016
Hmm. I recall very recently seeing a question like this, with unknowns a and b in an integral. I think the functions were rather complicated.
In almost all cases though, you will NOT be able to gain an analytical solution. You have two nonlinear equations in two unknowns. In most cases for complicated equations, there will be no analytical solution.
So, why do I expect there will be no solution? You cannot even compute these integrals analytically. If you could do so, then you would have done it, and then you would be asking how to solve a system of two nonlinear equations in two unknowns.
So at best, this is a numerical problem. vpasolve can sometimes solve such problems, but not always. Or, you could carefully turn it into a pair of calls to integral, conditional on known values of a and b. Then you could in theory use fsolve. Not trivial, and then you need to deal with all sorts of issues like convergence, how to locate multiple solutions, starting values, etc.
Walter Roberson
il 13 Nov 2016
This cannot be solved with the given information.
Consider
syms f(x) a b
f(x) = a * b * x;
z(x) = x * 108000/41261;
A = solve(int(f(x),x,sym(1)/2,sym(1))==sym(62)/100,a);
int( subs(f(x)*z(x), a, A), x, 0,sym(55)/100)==sym(24)/100
ans =
6/25 == 6/25
So the first integral works out because we ask it to find the a that makes it true. Then the second integral works out always. But what are a and b ? We know from A that a is 124/(75*b) but there is no a or b in the second equation, so we have nothing to go on.
A moment's reflection on the form of f(x) and z(x) will show you that nothing in them would have changed if a*b had been replaced by a single variable c . We can, in this situation, solve for the product a*b but not for the two values individually.
Therefore the general task is impossible. This is no possible solution for every possible form of f(x) and z(x) . There are solutions for some forms of f(x) and z(x).
2 Commenti
Walter Roberson
il 14 Nov 2016
With that f(x) and that z(x), both f(x) and f(x)*z(x) have closed form integrals (with erf). But there is no pretty closed form solution to the simultaneous equations. I suggest using vpasolve()
syms mu sigma real
assume(sigma >= 0)
Pi = sym('pi');
eqn = [int(exp(-(x-mu)^2/(2*sigma^2))/sqrt(2*sigma^2*Pi), x, 1/2, 1) == 0.62, int(exp(-(x-mu)^2/(2*sigma^2))*x/sqrt(2*sigma^2*Pi), x, 0, 0.55) == 0.24]
sol = vpasolve(eqn)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!