I am trying to learn weak derivatives. In that, we call $\mathbb{C}^{\infty}_{c}$ functions as test functions and we use these functions in weak derivatives. I want to understand why these are called test functions and why the functions with these properties are needed. I have some idea about these but couldn't understand them properly.
Also, I'll be happy if any one can suggest some good reference on this topic and Sobolev spaces.
Suppose you want to find the solution of a differential equation, $f'' = gf$ for example.
Take any solution $f$ of this equation, then if you take any function $\psi \in \rm C^{\infty}_c$ it is true to write $$f'' = gf \Longrightarrow \psi f'' = \psi gf \Longrightarrow \int \psi f'' = \int \psi g f \Longrightarrow \int \psi'' f = \int \psi g f$$
Conclusion : any solution of the differential equation $f$ satisfies $\int \psi'' f = \int \psi g f$ but it is possible that functions that are only continuous satisfies the same equation ! These solutions will be called weak solutions because they are solutions of a weaker problem.
Now, why have we chosen the functions $\psi$ to be in $\rm C^{\infty}_c$ ? It is because we transfered the derivation operation from $f$ to $\psi$ by integration by part ; this integration by part goes well only if you suppose that $\psi$ has compact support. I encourage you to do the details of the last implication and it will become clearer.