I am trying to evaluate some equations by using Taylor series of expansion (Series[], ExpandAll[], and Normal[] command), and using n equation and n unknown (Solve). Following is not full command (if you need, I would love to provide).


ser[expr_]:=Normal[Series[expr/.{Ωcp->ε*Ωcp,Ωp->ε*Ωp,Ωcj->ε*Ωcj,Ωj->ε*Ωj},{ε,0,1}]] /.ε->1

"list[0]" is lists equations with variables, and "unkowns" is lists of variable that I want so solve

Just for example, one equations from list[0] looks like,


and unkowns are σ[1,1],σ[1,2].....σ[4,4]

 ans[i] = Solve[List[i - 1] == 0, unkonwns[[i]];
 list[i] = ser[ExpandAll[list[i - 1]] /. ans[i]];
 t[i] = AbsoluteTime[];
 , {i, 1, 16}]

I am trying to solve 16 equations, by solving one, and replacing the variable I got from solve. I am using ExpandAll[] because if I do not expand it, it will not do proper Approximation later when I use series (I am not sure why). After that, I approximate the equations by expansion of order of 1, and repeat the process.


Using some other commands, I can get how much time it is spending, and how big is the equations that I want to solve.

index time {# of terms of a current equation, # of terms of a following equation}

First equations was contains only 5 elements, and it shows next elements that I am going to solve 5 elements, and time that MMA spend on the first equation was 0.19s.

I saw that my loop stop at 11th, it evaluated 164 terms in 35s, and next equation have 4693 terms. However, I have been running for two days. Anyone can approximate for me how long it will take to evaluate equations with 4693 terms? Anyway to make it faster? Is time increase linearly or exponentially by number of terms?


closed as unclear what you're asking by MarcoB, m_goldberg, user9660, Jens, Öskå Jul 1 '16 at 18:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ I did some regression on the times and made a log-log plot here. It looks like the time is increasing with the square of the number of equations used (and perhaps faster than that) $\endgroup$ – costrom Apr 4 '16 at 15:19
  • $\begingroup$ Would you mind giving me more detail? fitting is something like y~ N^2 $\endgroup$ – Saesun Kim Apr 4 '16 at 19:28
  • $\begingroup$ the regression line is more similar to: log(Time) ~ (log(N)^2) $\endgroup$ – costrom Apr 4 '16 at 19:36
  • $\begingroup$ when I extrapolated the time it would take to run the 4693 equations, it ended up being ~ 150,000 seconds (just shy of 2 days), but it likely underpredicts the actual time $\endgroup$ – costrom Apr 4 '16 at 19:37