0

Is there a way to solve this equation (find $x$)?

$\cos(x)(\pi/2-x) \gt \frac{3.544}{N}$

where $-\pi/2 \lt x \lt \pi/2$, and $N$ is positive number $\gt$ 2.

Thomas Andrews
  • 177,126

2 Answers2

1

As @Thomas Andrews commented, let $y=\frac \pi 2 -x$ and $\alpha=\frac {3.544}N$ to reduce the problem to $$y\,\sin(y)=\alpha$$

For approximations, use my favored $1400^+$ years old approximation of the sine function

$$\sin(y) \simeq \frac{16 (\pi -y) y}{5 \pi ^2-4 (\pi -y) y}\qquad \text{for} \qquad 0\leq y\leq\pi$$

To give you an idea of the accuracy, the norm $$\int_0^\pi \Big(y\,\sin(y)- \frac{16 (\pi -y) y^2}{5 \pi ^2-4 (\pi -y) y} \Big)^2\,dy$$ is explicit and its numerical value is $1.0585\times 10^{-5}$ (which is quite good).

So, the problem is to solve for $y$ the cubic equation $$16 \,y^3-4 (4\pi-\alpha)\, y^2-4 \pi \alpha\, y+5 \pi ^2 \alpha =0$$

Its discriminant is always positive as long as $\alpha \leq 1.817696$ (this is the case even for $N=2$). So, three real solutions.

Using $$p=\frac{\alpha ^2+4 \pi \alpha +16 \pi ^2}{48} \qquad \text{and} \qquad q=\frac{\alpha ^3+6 \pi \alpha ^2+246 \pi ^2 \alpha -64 \pi ^3}{864}$$ the three solutions are $$y_k=\frac{4 \pi -\alpha}{12}+2 \sqrt{\frac{p}{3}}\,\cos \left(\frac{1}{3} \left(2 \pi k-\cos ^{-1}\left(-\frac{3 \sqrt{3} q}{2 p^{3/2}}\right)\right)\right)$$ for $k=0,1,2$.

Since $y_2 <0$

  • the smallest root of the equation is $y_1$
  • the largest root of the equation is $y_0$

Just a few checks (the solutions being computed using Newton method) $$\left( \begin{array}{ccccc} N & \text{approximation} & \text{solution} & \text{approximation} & \text{solution} \\ 3 & 1.29691 & 1.29648 & 2.65187 & 2.65154 \\ 4 & 1.06898 & 1.06813 & 2.80231 & 2.80085 \\ 5 & 0.93334 & 0.93243 & 2.88018 & 2.87842 \\ 6 & 0.83970 & 0.83885 & 2.92854 & 2.92674 \\ 7 & 0.76980 & 0.76907 & 2.96165 & 2.95989 \\ 8 & 0.71497 & 0.71436 & 2.98579 & 2.98411 \\ 9 & 0.67045 & 0.66995 & 3.00419 & 3.00260 \\ 10 & 0.63332 & 0.63294 & 3.01868 & 3.01718 \\ \end{array} \right)$$

For large values of $N$, using Taylor series and power series reversion, we could simply use $$y_1=\sqrt \alpha \left(1+\frac{\alpha }{12}+\frac{29 \alpha ^2}{1440}+\frac{263 \alpha ^3}{40320}+O\left(\alpha ^4\right) \right)$$

$$y_0=\pi-\frac{\alpha} \pi\left(1+\frac{\alpha }{\pi ^2}+\frac{\left(12+\pi ^2\right) \alpha ^2}{6 \pi ^4}+\frac{\left(15+2 \pi ^2\right) \alpha ^3}{3 \pi ^6}+O\left(\alpha ^4\right) \right)$$ which, for $N=10$ would give $0.63291$ and $3.01720$ which are much better than the roots of the cubic equation.

-1

let $y=\pi/2−x$ this is equivalent to

$y\sin(y)\gt3.544/N$

for $y\in (0,\pi)$

firstly, lets do a numerical solution and plot N vs y.

we can use this matlab code

    % Define the range of N values
N_values = 3:100;

% Initialize arrays to store y values for each N y_values = zeros(length(N_values), 1);

% Solve for y for each N and x for i = 1:length(N_values) N = N_values(i);

% Solve the equation for y using fsolve
initial_guess = pi/2; % Initial guess for y
options = optimoptions('fsolve', 'Display', 'off');
y_values(i) = fsolve(@(y) y .* sin(y) - 3.544 ./ N, initial_guess, options);

end

% Plot N vs y figure; plot(N_values, y_values*180/pi); xlabel('N'); ylabel('y'); title('Plot of y as a Function of N'); grid on;

After plotting and see the curve, we can approximate the solution to this equation $\frac{a}{N^b}$.

This is a matlab code to find value of a,b according solution curve:

initial_params = [1 0.1];
fun = @(params, N) params(1) ./ (N .^ params(2));
params = lsqcurvefit(fun, initial_params, N_values, y_values');

So, the solution will be:

$y>\frac{2.1497}{N^{0.5344}}$

$\pi/2-x>\frac{2.1497}{N^{0.5344}}$

$x<\pi/2-\frac{2.1497}{N^{0.5344}}$

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. – Community Aug 12 '23 at 06:54