7
$\begingroup$

Would Mathematica be able to solve for the closed-form solution to the following type of problem?

enter image description here

For $i\in\{0,1,2,...\}$ we have that$$C_{3*i+1}=C\\C_{3*i+2}=-C\\C_{3*i+3}=C$$Assume $r\gt0$. What is the closed form solution for$$\sum_{i=1}^\infty\dfrac{C_i}{(1+r)^i}?$$

$\endgroup$

3 Answers 3

13
$\begingroup$
 c*Sum[1/(1+r)^(3*i - 2) - 1/(1+r)^(3*i - 1) + 1/(1+r)^(3*i), {i, 1, Infinity}]
 (* c (1 + r + r^2))/(r (3 + 3 r + r^2) *)
$\endgroup$
1
  • 1
    $\begingroup$ First, the grouping 1/(1+r)^(3*i - 2) - 1/(1+r)^(3*i - 1) + 1/(1+r)^(3*i) is made by hand, not with MMA. Second, that grouping should be grounded (see a related thread). In the case under consideration the series is absolutely convergent. $\endgroup$
    – user64494
    Commented Dec 15, 2023 at 15:10
7
$\begingroup$

This can be done as follows. First, we find an explicit formula for the coefficients by (c is used instead of C because capital letters are often reserved in WL.)

FindSequenceFunction[{c, -c, c, c, -c, c, c, -c, c}, i]

1/3 c (1 + E^(2/3 I (-3 + i) \[Pi]) + E^(4/3 I (-3 + i) \[Pi])) - 1/3 c (1 + E^(2/3 I (-2 + i) \[Pi]) + E^(4/3 I (-2 + i) \[Pi])) + 1/3 c (1 + E^(2/3 I (-1 + i) \[Pi]) + E^(4/3 I (-1 + i) \[Pi]))

Second, we find the sum of the series by

Sum[(1/3 c (1 + E^(2/3 I (-3 + i) \[Pi]) + E^(
    4/3 I (-3 + i) \[Pi])) - 
 1/3 c (1 + E^(2/3 I (-2 + i) \[Pi]) + E^(
    4/3 I (-2 + i) \[Pi])) + 
 1/3 c (1 + E^(2/3 I (-1 + i) \[Pi]) + E^(
    4/3 I (-1 + i) \[Pi])))/(1 + r)^i, {i, 1, Infinity}, 
  Assumptions -> r > 0] // FullSimplify

(c (1 + r + r^2))/(r (3 + r (3 + r)))

Addition. Simpler

Sum[Piecewise[{{c, Mod[i, 3] == 1}, {-c, Mod[i, 3] == 2},
{c,  Mod[i, 3] == 0}}]/(1 + r)^i, {i, 1, Infinity}, 
Assumptions -> r > 0]

(c (1 + r + r^2))/(r (3 + 3 r + r^2))

$\endgroup$
0
$\begingroup$

Using Switch:

Sum[Switch[Mod[i, 3], 0 | 1, c, 2, -c]/(1 + r)^i, {i, 1, Infinity}]

(c (1 + r + r^2))/(r (3 + 3r + r^2))

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.