How to Minimize the Integral of \(\int_0^{\pi/2} |\cos(x)-ax^2|\,dx\)?

In summary: More precisely if the integral as function of a and b is... $\displaystyle I= \frac{a\ \pi^{3}}{24} + 1 -2\ \sin b - \frac{2}{3}\ a\ b^{3}\ (1)$... and is also... $\displaystyle a = \frac{\ cos b}{b^{2}}\ (2)$ ... then combining (1) and (2) You obtain... $\displaystyle I = \frac{\pi^{3}\ \cos b}{24\ b^{2}} - 1 - 2\ \sin b - \frac{2}{3}\ b\ \cos b\ (3)$...
  • #1
Saitama
4,243
93
Problem:
Find the value of $a$ such that
$$\int_0^{\pi/2} |\cos(x)-ax^2|\,dx$$
is minimum.

Attempt:
Honestly, I don't know how to start. I tried the following:
$$\int_0^{\pi/2} |\cos(x)-ax^2|\,dx \geq \int_0^{\pi/2}|\cos(x)|\,dx-\int_0^{\pi/2}|a|x^2\,dx=1-\frac{|a|\pi^3}{24}$$
$$\Rightarrow \int_0^{\pi/2} |\cos(x)-ax^2|\,dx \geq 1-\frac{|a|\pi^3}{24}$$
but I am not sure if the above is a valid step. Even if it is, I don't know how to proceed from here. :(

Any help is appreciated. Thanks!
 
Physics news on Phys.org
  • #2
Let $P_0,P_1,P_2,...$ be orthonormal polynomials on $[0,\pi/2]$. Then to minimize your quantity it follows by general result about inner products that minimal would be projecting $\cos x$ onto $P_2$, i.e.
$$ \int_0^{\pi/2} \cos x \cdot P_2(x) ~ dx $$
So now it remains to compute the $P_n(x)$.
 
  • #3
Pranav said:
Problem:
Find the value of $a$ such that
$$\int_0^{\pi/2} |\cos(x)-ax^2|\,dx$$
is minimum.

Attempt:
Honestly, I don't know how to start. I tried the following:
$$\int_0^{\pi/2} |\cos(x)-ax^2|\,dx \geq \int_0^{\pi/2}|\cos(x)|\,dx-\int_0^{\pi/2}|a|x^2\,dx=1-\frac{|a|\pi^3}{24}$$
$$\Rightarrow \int_0^{\pi/2} |\cos(x)-ax^2|\,dx \geq 1-\frac{|a|\pi^3}{24}$$
but I am not sure if the above is a valid step. Even if it is, I don't know how to proceed from here. :(

Any help is appreciated. Thanks!

Hey Pranav! ;)

How about calculating the integral, taking the derivative with respect to $a$, and solve for being equal to zero?

You could almost use Leibniz integral rule or Differentiation under the integral sign, but the condition of Leibniz is not satisfied and otherwise it becomes too complicated.
 
  • #4
I like Serena said:
Hey Pranav! ;)

How about calculating the integral, taking the derivative with respect to $a$, and solve for being equal to zero?

I tried that. After differentiating wrt $a$, I got:
$$\int_0^{\pi/2} x^2\text{sgn}(\cos(x)-ax^2)\,dx=0$$
But I am not sure how to proceed after this. :confused:
 
  • #5
Pranav said:
I tried that. After differentiating wrt $a$, I got:
$$\int_0^{\pi/2} x^2\text{sgn}(\cos(x)-ax^2)\,dx=0$$
But I am not sure how to proceed after this. :confused:

Huh? How did you get that? :confused:

Suppose $b$ is the x coordinate where the expression changes its sign, or $\pi/2$ if it doesn't.
Then:
\begin{aligned}\int_0^{\pi/2} |\cos(x)-ax^2|\,dx
&=\int_0^b (\cos(x)-ax^2)\,dx +\int_b^{\pi/2} (ax^2 - \cos(x))\,dx \\
&= (-\sin x - \frac 1 3 ax^3)\Big|_0^b + (\frac 1 3 ax^3 +\sin x)\Big|_b^{\pi/2}
\end{aligned}
 
  • #6
I like Serena said:
Huh? How did you get that? :confused:
d/da(|cos(x)-ax^2| - Wolfram|Alpha

I used differentiation under the integral sign.

Suppose $b$ is the x coordinate where the expression changes its sign, or $\pi/2$ if it doesn't.
Then:
\begin{aligned}\int_0^{\pi/2} |\cos(x)-ax^2|\,dx
&=\int_0^b (\cos(x)-ax^2)\,dx +\int_b^{\pi/2} (ax^2 - \cos(x))\,dx \\
&= (-\sin x - \frac 1 3 ax^3)\Big|_0^b + (\frac 1 3 ax^3 +\sin x)\Big|_b^{\pi/2}
\end{aligned}
The definite integral comes out to be:
$$\frac{a\pi^3}{24}+1-2\sin b-\frac{2}{3}ab^3$$
How do I minimise this? :confused:
 
  • #7
Looks like I should have posted the original problem.

The original problem is as follows:
$$I=\int_0^{4\lim_{n\rightarrow \infty} \sum_{r=0}^{n} \frac{1}{16r^2+16r+3}} |\cos(x)-ax^2|\,dx$$
If the minimum value of I exists at $a=\cos \beta/\beta$. Then find $\beta$.

I computed the limit and that gave me the following integral:
$$I=\int_0^{\pi/2} |\cos(x)-ax^2|\,dx$$
Now I have to minimise this integral. I am not sure if posting the original problem statement helps.
 
  • #8
Pranav said:
d/da(|cos(x)-ax^2| - Wolfram|Alpha

I used differentiation under the integral sign.The definite integral comes out to be:
$$\frac{a\pi^3}{24}+1-2\sin b-\frac{2}{3}ab^3$$
How do I minimise this? :confused:

What You call b is the solution of the equation $\displaystyle \cos x - a\ x^{2} = 0$, so that You can obtain b as function of a inverting the function $\displaystyle a = \frac{\cos b}{b^{2}}$...

Kind regards

$\chi$ $\sigma$
 
  • #9
chisigma said:
What You call b is the solution of the equation $\displaystyle \cos x - a\ x^{2} = 0$, so that You can obtain b as function of a inverting the function $\displaystyle a = \frac{\cos b}{b^{2}}$...

Kind regards

$\chi$ $\sigma$

Thanks chisigma! :)

But I have stumbled upon a doubt, why did ILS assume that $\cos(x)>ax^2$ for x=0 to b? Does that make no difference? :confused:
 
  • #10
Pranav said:
Thanks chisigma! :)

But I have stumbled upon a doubt, why did ILS assume that $\cos(x)>ax^2$ for x=0 to b? Does that make no difference? :confused:

The function $\displaystyle f(x) = \cos x - a\ x^{2}$ for a>0 is monotonically decreasing and it vanishes for x=b, being $\displaystyle 0 < b < \frac{\pi}{2}$. Once You find b as function of a solving the equation $\displaystyle a = \frac{\cos b}{b^{2}}$ You solve the problem computing the minimum of the integral with the formula You have written...

Kind regards

$\chi$ $\sigma$
 
  • #11
chisigma said:
The function $\displaystyle f(x) = \cos x - a\ x^{2}$ for a>0 is monotonically decreasing and it vanishes for x=b, being $\displaystyle 0 < b < \frac{\pi}{2}$. Once You find b as function of a solving the equation $\displaystyle a = \frac{\cos b}{b^{2}}$ You solve the problem computing the minimum of the integral with the formula You have written...

Kind regards

$\chi$ $\sigma$

More precisely if the integral as function of a and b is...

$\displaystyle I= \frac{a\ \pi^{3}}{24} + 1 -2\ \sin b - \frac{2}{3}\ a\ b^{3}\ (1)$

... and is also...

$\displaystyle a = \frac{\ cos b}{b^{2}}\ (2)$

... then combining (1) and (2) You obtain...

$\displaystyle I = \frac{\pi^{3}\ \cos b}{24\ b^{2}} - 1 - 2\ \sin b - \frac{2}{3}\ b\ \cos b\ (3)$

... and now You have to minimize the (3) respect to b...

Kind regards

$\chi$ $\sigma$
 

FAQ: How to Minimize the Integral of \(\int_0^{\pi/2} |\cos(x)-ax^2|\,dx\)?

What is a definite integral?

A definite integral is a mathematical concept that represents the area under a curve on a graph. It is usually denoted by ∫, with a function to be integrated and limits of integration.

Why is it important to minimize a definite integral?

Minimizing a definite integral is important because it allows us to find the smallest possible value of the integral, which can have various applications in mathematics, physics, and engineering. It can also help us optimize functions and solve real-world problems.

What are the methods for minimizing a definite integral?

There are various methods for minimizing a definite integral, including the First Derivative Test, Second Derivative Test, and the method of Lagrange multipliers. These methods involve taking derivatives, setting them equal to zero, and solving for the optimal value.

What are the common mistakes to avoid when minimizing a definite integral?

One common mistake is forgetting to check the endpoints when solving for the optimal value. Another mistake is using the wrong method for a particular problem. It is also important to be careful with algebraic manipulations and to double-check the final answer.

Can definite integrals be minimized with more than one variable?

Yes, definite integrals can be minimized with more than one variable. This is known as a multivariable optimization problem and requires the use of partial derivatives and the method of Lagrange multipliers to find the optimal value.

Similar threads

Back
Top