Let $PRC$ denote some primitive recursive closed class.
Why would proving: $f \in PRC \rightarrow g(y,x_1,...,x_n)=\sum_{t=0}^yf(t,x_1,..,x_n)\in PRC$ by induction be wrong?
In the book "Computability, complexity, and languages", the following is stated:
A common error is to attempt to prove this by using mathematical induction on $y$. A little reflection reveals that such an argument by induction shows that $g(0,x_1,...,x_n), g(1,x_1,...,x_n),...$ all belong to $PRC$, but not that the function $g(y, x_1 , \dots, x_n)$, one of whose arguments is $y$, belongs to $PRC$.