# Collapse a Sum / factor an element out of a sum

I am trying to get something in the form of a $\Sigma (\dots) * \alpha_i = (\dots)$ from the output of the code below. The thing is that I cannot figure out how to tell Mathematica to "collapse" down to a single sum and factor out the $\alpha_i$.

Thank you,

John

$Assumptions = i ∈ Integers && j ∈ Integers && n ∈ Integers && i ∈ Constant && j ∈ Constant && n ∈ Constant; r[t_] = (D[#, {t, 2}] - t*D[#, t] + 1/6*# - (-3)) &; inner[x_] = (Integrate[ Simplify[ComplexExpand[#1 Conjugate[#2], TargetFunctions -> {Re, Im}]], {x, 0, 10}]) &; uB = 5 - π/5*x; ϕ[i_] = x^i*(10 - x); uApp = uB + Sum[Subscript[α, i]*ϕ[i], {i, 1, n}]; (r[x][uApp] /. x -> (10 - 0)/(n + 1)*j) == 0  - It's not clear to me what you mean by "collapsing down" - the$\alpha_i$can't be factored out of the sum over$i$because they depend on the summation index, don't they? – Jens Jan 22 at 3:56 I am not sure what you are trying to accomplish here. Are you trying to simplify the summand, or are you trying to factor a constant factor out of the sum entirely? Also, do you have a simpler example of your code, as the sum is getting lost in the details? (Yes, the pun was intended.) – rcollyer Jan 22 at 3:57 An unrelated issue is that you cannot declare variables as constants by saying j \[Element] Constant && n \[Element] Constant, because Constant isn't a domain of which something can be an element. To distinguish constants in a differentiation you don't have to do anything special. It's the opposite case that requires a little work - see here. – Jens Jan 22 at 4:11 Thank you for the responses. Currently, there are several summations, each linear in \alpha$_i. I wanted to collapse these down to a single sum. –  user1543042 Jan 22 at 15:26
If you expect MMA to be able to do any manipulations involving α, you're going to need to define a functional form α[i]. Is there any code missing here? –  Corey Kelly Jun 7 at 10:54