# Why superposition is useful just for linear functions?

I saw a problem which said that we have a bar between two walls and we increase the temperature. and as you know walls push a force to the bar so the length of it does not change. in the solution I saw that it said we do superposition which means that we first imagine that there is no wall so we calculate the change in length then we calculate the wall effect (force.) and it was written too that this (superposition) is useful just for the functions that are linear. Why?

• If you have two solutions to a linear differential equation, the sum is also a solution. When the differential equation is nonlinear that is not the case. Mar 5, 2016 at 16:31

A linear system is one where, if we have two inputs $x_1$ and $x_2$, producing outputs $y_1$ and $y_2$, then the output for an input of $\alpha{}x_1 + \beta{}x_2$ is $\alpha{}y_1 + \beta{}y_2$. This is precisely the property we rely on when we apply superposition to solve a problem with inputs composed of sums of easier-to-analyze inputs.