d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Need Google Sheets Help Sigma Function > Not Exactly Homework But Close Enough
Add Reply New Topic New Poll
Member
Posts: 15,627
Joined: Apr 3 2005
Gold: 16,095.50
Jul 13 2016 01:55am
here's the sheet https://docs.google.com/spreadsheets/d/1pBCy5BkuNHTWrMtuo7vtGEahleqtIssQ8EnRerFdZ_g/edit?usp=sharing
So, I have a costs function that increases by 25% for each upgrade, and sometimes I need multiple upgrades to reach a breakpoint.
What I used to do, if say I had 3 successive upgrades needed, was A4+a4*1.25+A4*1.25^2

That's a bit tedious, so I wanted a neat formula where I just input number of upgrades and it simply adds the sums of the formula A4*1.25^x with x going from zero until B3.
=SERIESSUM(1.25,B3-1,0,A4) seems to give a bad result somehow, as if it only gave me the last step on the equation without adding the ones before
=SERIESSUM(1.25,B3,0,A4) works perfectly as long as I set number of upgrades to one less than what I really need.

Does anyone have any idea how to fix this function?

This post was edited by StephanePare on Jul 13 2016 02:02am
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Jul 14 2016 03:32pm
Quote (https://support.google.com/docs/answer/3093444)
Syntax

SERIESSUM(x, n, m, a)

x - The input to the power series. Varies depending on the type of approximation, may be angle, exponent, or some other value.

n - The initial power to which to raise x in the power series.

m - The additive increment by which to increase x.

a - The array or range containing the coefficients of the power series.

While I don't completely understand what you are trying to do, I might be able to help a little:
remember A4+a4*1.25+A4*1.25^2 = A4*1.25^0 + A4*1.25^1 + A4*1.25^2, this makes it more obvious what to do.
=SERIESSUM(1.25, 0, 1, {A4,A4,A4} )

notice that m needs to be 1, we want the power to increase by 1 each time

notice that n is 0, we started the power at 0

notice that a is an array of the coefficients, your example had the same coefficient each time (A4). You might also notice that the size of this array (the number of entries in the array) determines how many members of the series we will be summing (in this case 3).

The only problem I see is how to populate this array automatically, but since I don't really understand what you are trying to do, I'm not sure how to go about that.

Hopefully this nudges you in the right direction.







Go Back To Homework Help Topic List
Add Reply New Topic New Poll