Solving an implicit equation
11 次查看(过去 30 天)
显示 更早的评论
Hello!
I am trying to solve an equation that has the following shape
Where C(x) is a numeric vector, a is a constant, and P is the function I am trying to obtain.
What I have done up until now is choosing the values of my variable x, from which I get the values of and then I use a numerical scheme based on a matrix inversion (home-made) to get the value of P at the preset values of x.
I have looked into solve or fsolve but I feel it's not quite what I am trying to do!
If this speaks to you I'd be happy to see an example of how you would approach the problem.
Thank you so much
Marco
0 个评论
回答(1 个)
Walter Roberson
2020-7-28
If C is a non-zero constant, then there is no continually-continuous solution for P.
Proof: do a taylor expansion of P(x) and subtract the taylor expansion of P(a*x) . The taylor expansion is going to be a series of polynomial terms, constant * x^power . For any one of the terms, substituting a*x would give you constant * a^power * x^power -- all except for the linear constant, corresponding to x^0 . Subtaction of constant*x^power and constant*a^power*x^power can be paired off, constant * (1-a^power) * x^power . But when you get to the linear constant, it is required to be the same for both P(x) and P(a*x) by definition, so subtracting there must give 0. Therefore the taylor expansion of P(x)-P(a*x) would be a polynomial with a zero constant term, just terms with x^power and power >= 1.
Now we supposed that C is a non-zero constant, but we have shown the the constant term of the taylor series must be 0.
We therefore have two possibilities: (1) the contradiction that C is not a non-zero constant (but could be 0); or (2) that no taylor series can be constructed for P(x) because some derivative of C is singular.
Even stronger than that: it cannot just be a problem with calculating the taylor expansion around some particular initial point, it has to be a problem with calculating the taylor expansion around every initial point. For example although 1/x cannot be expanded around initial point 0, it can be expanded around initial point delta, delta ~= 0, and by the same logic I went through above, the result of expanding P(x) - P(a*x) would still be polynomial in form with a 0 constant term.
For example my argument would not apply to a function such as P(x) = floor(x^2) because floor does not have continuous derivatives to form a taylor series of.
If we suppose that P(x) is continually-continuous and C(x) is a function of x that i continually-continuous then you can proceed by taylor expansion arguments on both sides of P(x)-P(a*x) = C(x) . You run into the same issue, that if C(x) has a constant term then there is no solution, and otherwise the solution is where the subscripts refer to corresponding terms of their taylor expansion. If C(x) is a polynomial (with zero constant term) then you can construct P(x) directly.
1 个评论
David Goodmanson
2020-7-28
编辑:David Goodmanson
2020-7-28
Hi Walter,
It seems fair to mention that if you do not require the entire real line for a solution space, then there is a solution with C(x) = constant:
b*log(x) - b*log(a*x) = -b*log(a) = C(x) x>0 a>0
or even
b*log(abs(x)) - b*log(a*abs(x)) = -b*log(a) = C(x) x~=0 a>0
and since b can be of either sign, so can C(x).
另请参阅
类别
在 Help Center 和 File 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!