Can anyone help me with this problem? There is already a post explaining it but I could really use further explanation. The problem states:

___________Let C(R) be the collection of all continuous functions from R to R (Set of reals to set of reals). Then C(R) is a vector space with pointwise addition and scalar multiplication defined by.

(f+g)(x)=f(x)+g(x) and (rf)(x)=rf(x).

for all f, g in C(R) and all r, x in R. Which of the following are subspaces of C(R)?

I: {f: f is twice differentiable and f''(x)-2f '(x)+3f(x)=0 for all x}II: {g: g is twice differentiable and g''(x)=3g'(x) for all x}III:{h: h is twice differentiable and h''(x)=h(x)+1 for all x}

A) I only B)I and II only C)I and III only D) II and III only E) I, II, and II

The answer is suppose to be B._______________

First I tried to find a function f that would satisfy the condition stated in I. I chose the function f(x)=e^(sx), for some unknown s, as a possible solution to the differential equation described in I. However, as I try to solve for the unknown constant I end up with an imaginary number which would imply that f is not within the set C(R).

The key here is to know that taking a derivative is a linear operation. For the set in question to be a subspace it needs to be closed under linear operations and must contain the 0 vector (in this case, the constant function f=0). Since taking a derivative is a linear operation, I, II, and III are all obviously closed under linear operations. (They are also all linear ODEs if that helps to convince you). The catch with III is that it doesn't contain the 0 function, so it cannot be a subspace.

Edit: One other thing I thought of. If you've done some ODEs before you'll know that one way to solve equations like these is to consider the derivatives instead as applications of a differential operator. So equation I, for example, would be D^2 - 2D + 3 = 0 if D is our operator. Then we can solve for D just like in a polynomial. If the polynomial has real roots say, A and B, then the solution to the differential equation is C(e^At) + D(e^Bt) where C and D are arbitrary constants. But if the polynomial has imaginary roots (likely the imaginary number you calculated) then we need to use Euler's identity e^it = cost + isint to make sense of it. So now the solutions will take the same form as before (C(e^At) + D(e^Bt)) but if A and B have some imaginary part then we need to break the solution down using Euler's identity and take the real part of the whole expression which will likely be some sum of sines and cosines of different periods. Note that since these are linear differential equations, taking just the real part of the solution won't stop it from satisfying the differential equation. So in trying to calculate a solution you probably weren't far off, you just needed to use Euler's identity and take the real part.