Math, asked by sravanmathew8928, 11 months ago

Giving an integer and return the maximum product of the numbers which sums up to the given number.

Answers

Answered by CarlynBronk
4

Let the integer be X.

Suppose ,X = A + B

And Let P be the product.

P = A B

P = A ( X - A)

P= A X - A²

Differentiating both sides with respect to A

\frac{\mathrm{d} P}{\mathrm{d} A}=\frac{\mathrm{d} [A X -X^{2}]}{\mathrm{d} A}=X - 2 A

For Maxima or minima

\frac{\mathrm{d} P}{\mathrm{d} A} =0

→ X - 2 A =0

→ - 2 A = -X

cancelling negative sign from both sides

→2 A= X

→ A = X/2

As , X = A + B

→ X= X/2 + B

→ X - X/2 = B

→B = X/2

\frac{\mathrm{d^{2}P} }{\mathrm{d} A^{2}}}= - 2,

Which is negative.As double derivative is negative So P will attain it's maximum value at when A= X/2 and B=X/2, where X is any integer.

For example, suppose an integer be 10, it will attain it's maximum product when we divide it into two equal parts i.e (10/2, 10/2) which is (5,5).




Similar questions