All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math > Calculus
Second derivative of a cosine product (Posted on 2024-02-27) Difficulty: 4 of 5
For natural number n, define f_n(x) as the product cos(x) * cos(2x) * cos(3x) * .... * cos(nx).

What is the smallest n such that |f_n''(0)| > 2024?

No Solution Yet Submitted by Brian Smith    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Three methods | Comment 2 of 5 |
The smallest n making |second derivative| greater than 2024 is 18

For this function the second derivative at zero is always negative and we want the absolute value, so just find -f"(x)

Method 1:
from Desmos; see   https://www.desmos.com/calculator/l65vpj1t0g
n  -fn''(0)
1  1
2  5
3  14
4  30
5  55
6  91
This is in oeis as A000330, and by counting terms, the 17th is 1785 and the 18th is 2109

f"_n(0) = n*(n+1)*(2*n+1)/6

Method 2:
Using Wolfram Alpha to take 2nd derivatives of the first several f_i(x) functions (multiplied by -1) shows
f''(x) = cos(x)
f''(x) = 5 cos(x) cos(2 x) - 4 sin(x) sin(2 x)
f''(x) = 2 (7 cos(x) cos(2 x) cos(3 x) - 2 sin(x) sin(2 x) cos(3 x) - 3 sin(x) sin(3 x) cos(2 x) - 6 sin(2 x) sin(3 x) cos(x))
f''(x) = 2 (15 cos(x) cos(2 x) cos(3 x) cos(4 x) - 2 sin(x) sin(2 x) cos(3 x) cos(4 x) - 3 sin(x) sin(3 x) cos(2 x) cos(4 x) - 6 sin(2 x) sin(3 x) cos(x) cos(4 x) - 4 sin(x) sin(4 x) cos(2 x) cos(3 x) - 8 sin(2 x) sin(4 x) cos(x) cos(3 x) - 12 sin(3 x) sin(4 x) cos(x) cos(2 x))

Replace all cos terms with 1, all sin terms with 0:
The sequence is:  1, 5, 14, 30

Method 3:
Numerically calculate second derivative.
f'(x) = (f(x+ε) - f(x))/ε
f"(x) = (f'x+ε) - f'x))/ε
      = (f(x+2ε) - 2f(x+ε) + f(x))/ε^2

Program output:
1 1
2 5
3 14
4 30
5 55
6 91
7 140
8 204
9 285
10 385
11 506
12 650
13 819
14 1015
15 1240
16 1496
17 1785
18 2109
The smallest n making |second derivative| greater than 2024 is 18

------------------
import math
epsilon = .0000001

def f(x,n):
    ans = 1
    for i in range(1,n+1):
        ans *= math.cos(i*x)
    return ans

def d2(x,n):
    """ Second derivative
    f'(x) = (f(x+ε) - f(x))/ε
    f"(x) = (f'x+ε) - f'x))/ε
          = (f(x+2ε) - 2f(x+ε) + f(x))/ε^2 """
    ans = (f(x+2*epsilon,n) - 2*f(x+epsilon,n) + f(x,n) ) / (epsilon**2)
    return - ans

for i in range(1,100):
    print(i, round(d2(0,i)))
    if d2(0,i) > 2024:
        print('The smallest n making |second derivative| greater than 2024 is', i)
        break

  Posted by Larry on 2024-02-27 13:07:21
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (5)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information