Minimize a function: Find value of x that result in lowest value of formula

In summary: A^3}{3x^3+9x^2+18x+36} Thanks Mark! As I am interested in extrema points so I took 2nd derivative not the first 1 and simplify it into cubic equation of degree 3. And then using Cardano’s formula I found the roots and took real root as my minimum value of x.
  • #1
gevni
25
0
Hi, I have this formula, What I want is to find the value of "x" (without trying all possibilities) so that the result of the formula will be the lowest possible value under the constraint when x !=0, and x<n. Here, values of A,B,C, Q, R,n are already known and fixed.

\(\displaystyle f(x)=A\left(((\frac{Q}{n-x}-\frac{R}{x})+(n-x))n\right)+Bnx+C((\frac{R}{x})n)\)

How can I find the value of x? I know that x can be between 1 to n-1. But how do I continue from there? I was thinking there must be a way to calculate it instead of trying a lot of possibilities. Like some derived equation for optimal value of x that made the whole formula sum the lowest possible.
 
Physics news on Phys.org
  • #2
gevni said:
Hi, I have this formula, What I want is to find the value of "x" (without trying all possibilities) so that the result of the formula will be the lowest possible value under the constraint when x !=0, and x<n. Here, values of A,B,C, Q, R,n are already known and fixed.

\(\displaystyle f(x)=A\left(((\frac{Q}{n-x}-\frac{R}{x})+(n-x))n\right)+Bnx+C((\frac{R}{x})n)\)

How can I find the value of x? I know that x can be between 1 to n-1. But how do I continue from there? I was thinking there must be a way to calculate it instead of trying a lot of possibilities. Like some derived equation for optimal value of x that made the whole formula sum the lowest possible.

Update: I remove the constant n and then take the 1st and 2nd derivative. Now my formula is like that;

\(\displaystyle f(x)=A\left((\frac{Q}{n-x}-\frac{R}{x})+(n-x)\right)+Bx+C(\frac{R}{x})\)

I took first and 2nd derivative as
\(\displaystyle f′(x)= A\left(\dfrac{R}{x^2}+\dfrac{Q}{\left(n-x\right)^2}-1\right)-\dfrac{CR}{x^2}+B \)

\(\displaystyle f′′(x)= A(\dfrac{2Q}{(n−x)^3}−\dfrac{2R}{x^3})+\dfrac{2CR}{x^3} \)

What would be the next step to find value of x that will minimize this equation?
 
  • #3
Okay, what you want to do now is equate your first derivative to zero to find your critical values, that is those values of \(x\) that may optimize the function. What do you find?
 
  • #4
MarkFL said:
Okay, what you want to do now is equate your first derivative to zero to find your critical values, that is those values of \(x\) that may optimize the function. What do you find?
Thanks you for the reply. For finding the critical points for x do I need to put the values of known constant in the formula?
 
  • #5
gevni said:
Thanks you for the reply. For finding the critical points for x do I need to put the values of known constant in the formula?

No, you can get your critical values in terms of the parameters. There's no need to plug those in.
 
  • #6
Let's follow up...we want:

\(\displaystyle f'(x)=A\left(\frac{R}{x^2}+\frac{Q}{(n-x)^2}-1\right)-\frac{CR}{x^2}+B=0\)

\(\displaystyle f'(x)=\frac{AR}{x^2}+\frac{AQ}{(n-x)^2}-A-\frac{CR}{x^2}+B=0\)

\(\displaystyle f'(x)=\frac{AR(n-x)^2+AQx^2-Ax^2(n-x)^2-CR(n-x)^2+Bx^2(n-x)^2}{x^2(n-x)^2}=0\)

As you have stated that \(x\ne0\) and \(x<n\), this implies:

\(\displaystyle AR(n-x)^2+AQx^2-Ax^2(n-x)^2-CR(n-x)^2+Bx^2(n-x)^2=0\)

As this is a 4th degree polynomial, I would at this point consider substituting in for the parameters (as you asked about doing) and then using software or a numeric technique to approximate the roots.
 
  • #7
MarkFL said:
Let's follow up...we want:

\(\displaystyle f'(x)=A\left(\frac{R}{x^2}+\frac{Q}{(n-x)^2}-1\right)-\frac{CR}{x^2}+B=0\)

\(\displaystyle f'(x)=\frac{AR}{x^2}+\frac{AQ}{(n-x)^2}-A-\frac{CR}{x^2}+B=0\)

\(\displaystyle f'(x)=\frac{AR(n-x)^2+AQx^2-Ax^2(n-x)^2-CR(n-x)^2+Bx^2(n-x)^2}{x^2(n-x)^2}=0\)

As you have stated that \(x\ne0\) and \(x<n\), this implies:

\(\displaystyle AR(n-x)^2+AQx^2-Ax^2(n-x)^2-CR(n-x)^2+Bx^2(n-x)^2=0\)

As this is a 4th degree polynomial, I would at this point consider substituting in for the parameters (as you asked about doing) and then using software or a numeric technique to approximate the roots.
Thanks Mark! As I am interested in extrema points so I took 2nd derivative not the first 1 and simplify it into cubic equation of degree 3. And then using Cardano’s formula I found the roots and took real root as my minimum value of x.
 

FAQ: Minimize a function: Find value of x that result in lowest value of formula

1. What is the purpose of minimizing a function?

Minimizing a function is used to find the lowest possible value of a formula. This can be useful in many applications, such as optimizing a process or finding the most efficient solution to a problem.

2. How do you determine the value of x that results in the lowest value of a formula?

To find the value of x that results in the lowest value of a formula, you can use methods such as gradient descent or the Newton-Raphson method. These involve iteratively updating the value of x until the minimum is reached.

3. What is the difference between minimizing and maximizing a function?

Minimizing a function involves finding the lowest value of a formula, while maximizing a function involves finding the highest value. Both processes use similar methods, but the goal is different.

4. Can any function be minimized?

Not all functions can be minimized, as some may not have a well-defined minimum. For example, a function with no lower bound or a function with multiple local minima may not be able to be minimized.

5. Are there any real-world applications of minimizing a function?

Yes, minimizing a function has many real-world applications. It is commonly used in fields such as economics, engineering, and statistics to optimize processes and find the most efficient solutions to problems.

Similar threads

Back
Top