[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]

/sci/ - Science & Math


View post   

File: 350 KB, 700x700, 1554917683416.png [View same] [iqdb] [saucenao] [google]
10592438 No.10592438 [Reply] [Original]

how do you calculate the formula for the sum of a series that's neither arithmetic nor geometric?
i'm trying to optimise an algorithm for the project im doing and i've noticed a series that goes like this:
n*[x+ (n-1)/2 * y] + (n-1)[x+(n-2)/2 * y] +...+(2x+y) + x
where x and y are const variables
i guess i could look at it as two different series, i.e. n*x + (n-1)x +...+x and n*(n-1)/2 * y + (n-1)(n-2)/2 * y +...+y + 0, then the first sum is easy since its arithmetic but for love of god i cant remember how to do the second one
sorry if that's something obvious but i haven't done math in some while

>> No.10592462

>>10592438
rewrite the first two terms to get (n+n-2)*(n-1) -> 2(n-1)^2
repeat that to get 2(n-1)^2 + 2(n-3)^2 + 2(n-5)^2...
Hope this helps.

>> No.10592464

>>10592462
Edit:

Multiply the series with y/2.

>> No.10592485

>>10592462
>>10592464
thanks a bunch

>> No.10592493

>>10592462
>>10592464
ah but one more thing, can i somehow get y(n-1)^2 + y(n-3)^2 +... + y into a single formula or rather it has to stay in that form?
i mean like for arithmetic series: 1+2+..+n = (1+n) * n/2

>> No.10592527

>>10592493
Use the already known formula for S(x^2) = f(x)
Multiplying it by any constants won't change the sum, so S(2x^2) = 2f(x).
Because the sum is additive, the sum formula is too, so S(2x^2+1) = 2f(x)+S(1)

>> No.10592534

>>10592527
Corrections. It's meant to be S(4x^2) if you're interested in skipping every second index.
You should get: 4n(n+1)(2n+1)/6+S(8x)+S(4).

>> No.10592539

>>10592527
>>10592534
kk, thanks, a break from math didnt really do me much good