0

Note: This question is actually for help writing a computer program, but the math is where I'm having difficulty, so I think it best to ask here.

My goal is to transform an equation with this format (numbers chosen at random for example):

Sum(x = 0 to 5) of [(1 + xy)(10 + 5^x)] = 100

into an equation without the x variable (so that the aforementioned computer program can solve it). I know it's possible to do so, because plugging it into Wolfram Alpha yields an alternate form of 18705 y + 3966 = 100.

I need to know how to make the first equation into the second one. My instinct was to begin by making the first equation into [Sum(x = 0 to 5) of (1 + xy)] * [Sum(x = 0 to 5) of (10 + 5^x)] = 100, but after many failed attempts to achieve the correct result, realized that that is not equivalent to the first equation :)

Thanks in advance!

BrianH
  • 115
  • $$ \sum_{x = 0}^5 (1 + xy)(10 + 5^x) = \sum_{x = 0}^5 (10+10xy+5^x+xy,5^x) = 60 + 10y \sum_{x = 0}^5 x+ \sum_{x = 0}^5 5^x + y \sum_{x = 0}^5 x,5^x $$ – dxiv May 12 '17 at 00:26
  • @dxiv Thank you! That's what I needed! If you make that an answer I'll accept it – BrianH May 12 '17 at 00:29

2 Answers2

0

In your equation, you have $$\sum_{x = 0}^5 (1 + xy)(10 + 5^x)$$ This means that you should plug in $x = 0, 1, 2, 3, 4, 5$ into the expression, and add up all the resulting terms. For example, your sum will expand to something like $$(1 + 0y)(10 + 5^0) + (1 + 1y)(10 + 5^1) + \cdots + (1 + 5y)(10 + 5^5)$$

Once you expand this and collect like terms, you should end up with an equivalent expression.

Joppy
  • 12,875
  • This would work for a person, but the computer couldn't handle this (at least not the program I'm writing). I upvoted the answer though since it does answer the question. Thank you! – BrianH May 12 '17 at 00:30
  • If you're programming it on a computer, you just do exactly the same thing, but get the computer to sub in $x = 0, 1, \ldots$. I guess I'm a bit confused as to what you want as an answer. – Joppy May 12 '17 at 00:33
  • The computer can't have an unknown variable (y), as least not that I'm aware of. I can write "int y = 5" but I can't write "100 = y + 7", because the program will throw a build error. (I'm coding in C#). With dxiv's solution, I can get to a place where I can write "int y = (something)", whereas with this I can't, because y isn't isolated. – BrianH May 12 '17 at 00:39
0

Hint (elaborating on the previous comment):

$$ \sum_{x = 0}^5 (1 + xy)(10 + 5^x) = \sum_{x = 0}^5 (10+10xy+5^x+xy\,5^x) = 60 + 10y \sum_{x = 0}^5 x+ \sum_{x = 0}^5 5^x + y \sum_{x = 0}^5 x\,5^x $$

All sums in this particular example can actually be calculated explicitly: the first one is the sum of an arithmetic progression, the second one is the sum of a geometric progression, and the last one can be calculated as well (from the derivative of the sum of a geometric progression).

dxiv
  • 76,497