Sum the Infinite Series - MATLAB Cody - MATLAB Central

Problem 415. Sum the Infinite Series

Difficulty:Rate
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) + ...

Solution Stats

12.56% Correct | 87.44% Incorrect
Last Solution submitted on May 10, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers132

Suggested Problems

More from this Author3

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page