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?
The smallest such n is 18: The second derivative for the resulting function is -2109 at x=0.
fs='f=1';
syms x
for n=1:100
fs=[fs '*cos(' num2str(n) '*x)'];
eval([fs ';']);
f1 =diff(f);
f2 = diff(f1);
v=vpa(subs(f2,x,0));
disp([n v])
if abs(v)>2024
n
break
end
end
finds
n second derivative
at x = zero
[1, -1.0]
[2, -5.0]
[3, -14.0]
[4, -30.0]
[5, -55.0]
[6, -91.0]
[7, -140.0]
[8, -204.0]
[9, -285.0]
[10, -385.0]
[11, -506.0]
[12, -650.0]
[13, -819.0]
[14, -1015.0]
[15, -1240.0]
[16, -1496.0]
[17, -1785.0]
[18, -2109.0]
n =
18
>>
|
Posted by Charlie
on 2024-02-27 12:18:43 |