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

Click For Summary

Discussion Overview

The discussion centers around minimizing the integral $$\int_0^{\pi/2} |\cos(x)-ax^2|\,dx$$ with respect to the parameter \(a\). Participants explore various approaches to tackle this problem, including differentiation techniques and properties of orthonormal polynomials.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant expresses uncertainty about how to start the problem and proposes an inequality involving the integral.
  • Another participant suggests using orthonormal polynomials and projecting \(\cos(x)\) onto a polynomial to minimize the integral.
  • Several participants discuss differentiating the integral with respect to \(a\) and setting the result to zero to find critical points.
  • There is a mention of a specific point \(b\) where the expression \(\cos(x) - ax^2\) changes sign, leading to a piecewise evaluation of the integral.
  • One participant introduces a modified version of the problem involving a limit and asks if sharing the original problem statement is beneficial.
  • Another participant points out the assumption that \(\cos(x) > ax^2\) in a certain interval and questions its validity.
  • Discussion includes the monotonicity of the function \(f(x) = \cos(x) - ax^2\) and its implications for finding the point \(b\). Participants explore how to express \(b\) as a function of \(a\) and how to minimize the resulting integral.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to minimize the integral. Multiple competing views and methods are presented, and the discussion remains unresolved.

Contextual Notes

Participants express uncertainty regarding the validity of certain steps in their reasoning, particularly concerning the assumptions made about the behavior of the functions involved and the conditions under which differentiation is applied.

Saitama
Messages
4,244
Reaction score
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
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)$.
 
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.
 
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:
 
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}
 
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:
 
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.
 
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$
 
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$
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
4K
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K