In real time systems / control engineering we have to solve exercises like this:
Check if the following systems are linear:
1) $0.2\ddot{x}(t) - (t^2 + 2t -1) x(t) = 3 w(t)$
2) $\ddot{x}(t) + \dot{x}(t) + x(t) = w(t)$
A student created the following solution:
1) $$\begin{align}&0.2 \frac{d^2 (h x_1 (t) + l x_2(t))}{d t^2} - (t^2 +2t-1)(h x_1(t) + l x_2(t))\\ =&0.2 h \ddot{x_1}(t) - (t^2 + 2t-1) h x_1(t) + 0.2 l \ddot{x}_2(t) - (t^2 + 2t-1) l x_2(t)\\ =& h w_1(t) + l w_2(t) \Rightarrow \text{linear}\end{align}$$
2) not linear because of +1
see Laplace: $s^2 X(s) + s X(s) + X(s) + \frac{1}{s} = W(1) \Rightarrow \frac{X(s)}{W(s)} = \frac{1}{s^2 + s +1} - \frac{1}{s(s^2 + s + 1) W(s)} \Rightarrow$ no transfer function $\Rightarrow$ not linear.
Could somebody please explain how one can decide for arbitrary systems if they are linear?
I don't understand the steps which were done in (1) either.
A function $L$ acting on some collection of "vectors" is called linear if for any scalar $c$ and two "vectors" $x_1,x_2$, we have $L(cx_1+x_2)=cL(x_1)+L(x_2)$. In other words, $L$ commutes with scalar multiplication and distributes over vector addition. In differential equations these are usually functions themselves, but I call them "vectors" because they are elements of some vector space, which means that many of the tools from linear algebra are applicable in this setting.
An equation is called linear if it is of the form $Lx=y$ for some linear function $L$, some unknown "vector" $x$, and some known "vector" $y$ (which, because it's known, cannot have any explicit dependence on $x$).
Here, unless $w$ implicitly depends on $x$ in some fashion that you haven't specified, both of your equations are linear. That's because differentiation is linear, multiplication by a fixed function of $t$ is linear, and sums of linear functions are linear.
I don't really understand why you would need to calculate the transfer function to determine if your equation is linear or not.