Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 \[Element] Integers && j \[Element] Integers && 
n \[Element] Integers && i \[Element] Constant && 
j \[Element] Constant && n \[Element] 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 - \[Pi]/5*x;
\[Phi][i_] = x^i*(10 - x);
uApp = uB + Sum[Subscript[\[Alpha], i]*\[Phi][i], {i, 1, n}];

(r[x][uApp] /. x -> (10 - 0)/(n + 1)*j) == 0
share|improve this question
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

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.