2

I was doing a personal project until I came upon this equation that i need to solve to continue, the thing is I don’t thing I have been thought this in math ever so i wonder if this even possible to solve at all if why or why not

2850=2x+4y+6z

If i can get more specific, it needs to be real numbers, and cannot be negatives, and must be only integers, no fractions. Can values aside from all real numbers be obtain with those limitations, or is it impossible?

And Thank you for thank you time to answer.

IV_
  • 7,902
Vin
  • 21

3 Answers3

1

As have been mentioned in the comments, the equation defines a plane. To 'solve' the equation, maybe you mean, what values for $x,$y provide a desired value of $z$.

I would assume that this problem qualifies to be a "Diophantine Equation".

A rigorous technique to solve such a problem, is discussed with an example in the answer of the user: robjohn in:Extended Euclidean Algorithm.

Assuming that you are not interested in deep theory, you can get a 'solution' either by a simple computer program with nested loops or a plot of the function in the form $z=..."$, such as the one below. Depending on the plotting tool, you can get more information about any point in the plane by a mouse click. Each positive-valued pair of $x$ and $y$ on the plane is a 'solution'. Note that the shown picture does not represent all solutions, since it is plotted in a specific range. Graphing could answer some questions one can't easily get a closed-form for sometimes.

The plot below is made for $z=(2850-2x-4y)/6$

If you have more information, for example $x+y<= 30$ for $Z=441$, in this case you could further limit the number of points that satisfies the relationship.

It may be interesting to know that there is a branch in Mathematics called "Integer Linear Programming" that deals with finding extreme value for such relationships.

The tool used is:3-D Surface Plotter

enter image description here

NoChance
  • 6,695
0

You have a linear equation. That means you have a system of linear equations: a system of $1$ equation and $3$ variables. Because the number of variables is greater than the number of equations, the system is underdetermined. That means the system has infinitely many solutions.

But you are asking only for the non-negative integers.
$\ $

$$2850=2x+4y+6z$$

$$1425=x+2y+3z$$

Because you are asking for non-negative integers, you are asking for integer partitions of 1425.

You need a calculation software for that.

a)
You can use an algorithm that generates all $113072609699904337559514844445146843472$ partitions of $1425$ and write a small algorithm for extracting the wanted partitions.

b)
Here is a Maple code for generating only the wanted partitions:
$\text{n:=1425:}$
$\text{add(add(x^(n-2*j-3*k)*y^j*z^k,j=0..(n-3*k)/2),k=0..n/3);}$
Because the number of partitions is too large, you should split the command, e.g. into steps of $100$:
$\text{add(add(x^(n-2*j-3*k)*y^j*z^k,j=0..(n-3*k)/2),k=0..100);}$
$\text{add(add(x^(n-2*j-3*k)*y^j*z^k,j=0..(n-3*k)/2),k=101..200);}$
...
$\text{add(add(x^(n-2*j-3*k)*y^j*z^k,j=0..(n-3*k)/2),k=401..475);}$
You can translate that e.g. into the language of SageMathCell.

c)
You can write that in a loop algorithm.
Here is a Maple code:
$\text{n:=1425:}$
$\text{for k from 0 to n/3 do}$
$\text{ for j from 0 to (n-3*k)/2 do}$
$\text{ x^(n-2*j-3*k)*y^j*z^k:}$
$\text{print(%):}$
$\text{ od:}$
$\text{od:}$
You can translate that e.g. into the language of SageMathCell.

IV_
  • 7,902
  • It would be nice to know how did you convert equation to a number of partitions problem and got this huge number of solutions. – NoChance Nov 13 '22 at 08:21
  • @NoChance Combinatorial counting problems are different from generating problems. No closed-form expression for the unrestricted partition function is known. There are recurrence equations and power series. See Wikipedia: Partition (number theory). OEIS: A000041 https://oeis.org/A000041 – IV_ Nov 13 '22 at 13:21
  • Thanks for your reply. Its a bit over my skill level to figure it out. – NoChance Nov 13 '22 at 19:51
0

Let assume $x,y,z$ are positive integers.

$$x+2y+3z = 1425\tag{1}$$ $x+2y+3z -1425 \equiv x+z-1 \pmod{2}$, then $z=2m+1-x.$
Substitute $z=2m+1-x$ to $(1)$, then we get
$$-x+y+3m = 711$$ Let $x=n$, then we get $$y = -3m+n+711$$ Finally, $(x,y,z)=(n, -3m+n+711, 2m+1-n).$
$m,n$ are integers.
Choose $m,n$ so that $x,y,z$ are positive.

Tomita
  • 3,209