Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 415. Sum the Infinite Series

Created by Roger Stafford
Given that 0 < x and x < 2*pi where x is in radians, write a function
 [c,s] = infinite_series(x);

that returns with the sums of the two infinite series

 c = cos(2*x)/1/2 + cos(3*x)/2/3 + cos(4*x)/3/4 + ... + cos((n+1)*x)/n/(n+1) + ...
 s = sin(2*x)/1/2 + sin(3*x)/2/3 + sin(4*x)/3/4 + ... + sin((n+1)*x)/n/(n+1) + ...

Problem Group

Solution Statistics

24 correct solutions 63 incorrect solutions
Last solution submitted on Sep 04, 2015

Problem Comments

Solution Comments