Clear Filters
Clear Filters

finding all sets that satisfy an under-determined equation?

4 views (last 30 days)
Dear MATLAB Experts,
The solution to a problem is a 4 dimensional surface as
A*f(x) + B*f(y) + C*f(z) + D*f(t) = 0
where A, B, C, and D are determined coefficients and functions f show how the variables appear in the solution. They could be linear, quadratic, or exponential. For simplicity, assume linear dependences for f functions such as
2*x + 1*y + 4*z + 1*t = 0.
I believe the approach to answer my question may be general enough to be applied to complicated cases as well. Now, I know that variables x, y, and z are confined in an interval and variable t is confined in another interval, let's say [0,3] and [0, 2], respectively. I want to find as many as possible sets of (x,y,z,t) in those intervals that is a solution to the equation above.
Is there anyway in MATLAB that I can do the task?
Thanks so much for your help.
  1 Comment
Walter Roberson
Walter Roberson on 15 Sep 2017
Could you confirm that f will always be a function of a single variable?
If it is, then there are going to be an indefinite number of solutions. limit A*f(x+deltax) deltax->0 is A*(df evaluated at x) ; you can then form a ratio with respect to B and calculate the df evaluated at y that would be needed to balance out the change, and then solve given the known df formula. But you could also do the same thing for any pair of {A, B, C, D}, and there will also be triple and quad combinations that also balance out.

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 15 Sep 2017
Edited: John D'Errico on 15 Sep 2017
As Walter points out, even such a simple problem as
2*x + 1*y + 4*z + 1*t = 0
has infinitely many solutions. If you restrict things to some intervals, then it may be there are no solutions at all. For example, in the problem above, if x,y,z all must lie in the interval [0.1], then we know that
0 <= 2*x + 1*y + 4*z <= 7
So suppose that you decide t to be in the interval [10,20]. Can any solution ever exist? Of course not.
But suppose you decided that t lies in the interval [-8,-3]? Now there are an infinite number of solutions, and no simple way to describe them all, except most simply as solutions to that equation.
Make your function (f) more complicated and it changes nothing.

Community Treasure Hunt

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

Start Hunting!