Superposition in state space equation with multiple harmonics in the inputs

I have a question related to the superposition in state space equation. Suppose I have a state space equation below $$$$\frac{d}{dt}X = AX + B\begin{vmatrix} u_1(t)\\ u_2(t) \\ \end{vmatrix}$$$$ where X is the state vector, A, B are constant matrixes. u is the input time varying signals.

Now assume u can be expressed as $$$$u_1(t) = c_1\cos(w_1t)+c_2\cos(w_2t)\\ u_2(t) = d_1\cos(w_1t)+d_2\cos(w_2t)\\$$$$ where c1, c2, d1, d2 are constant coefficients, and w1 and w2 are different.

Can I rewrite the state space equation into the following two equations: $$$$\frac{d}{dt}X_1 = AX_1 + B\begin{vmatrix} c_1\cos(w_1t)\\ d_1\cos(w_1t) \\ \end{vmatrix}$$$$ and $$$$\frac{d}{dt}X_2 = AX_2 + B\begin{vmatrix} c_2\cos(w_2t)\\ d_2\cos(w_2t) \\ \end{vmatrix}$$$$

And then I solve for time-domain steady state expression for X1 and X2. The final time domain expression for X would be $$$$X = X_1+X_2$$$$

Is there anything wrong with this method?

That's correct!

It's the magic of linear systems.

Find it also on Wikipedia.

• One does need to ensure that the initial conditions also satisfy $X(t_0)=X_1(t_0)+X_2(t_0)$. Jun 8, 2022 at 9:52
• Yes, definitely, which basically enforces a constraint on one of the substates $X_i(t_0)$ since we're initially given with $X(t_0)$. Jun 8, 2022 at 10:04