Let us suppose I have a continuous smooth function
$f : \mathbb R^n\rightarrow \mathbb R$
Satisfying
$f(\lambda x_1,\lambda x_2, \ldots ,\lambda x_n)= \lambda f( x_1,x_2, \ldots , x_n),\space \forall\lambda\in\mathbb R \space \ldots(linear \space condition)$
My objective is to find the function $f$
Attempt:
Expand in Taylor series the function $f$ for $n$ variables $(i.e.\space x_i)\space in \space the\space equation\space of \space linear \space condition$
1)The constant term is zero as $f(0,...,0)=0$.
2)The linear terms cancel either side.
3)With the higher order terms of coefficients c, $$\lambda^{k-1}c_k=c_k$$
This condition holds true $\forall k,\lambda \in \mathbb R$
This implies that all coefficients of higher order(>1) terms are zero.
Hence I conclude that the function is $$f( x_1,x_2, \ldots , x_n)= a_1 x_1 + a_2 x_2 \ldots +a_n x_n$$
for some constants $a_i(1\leq i \leq n)$
My doubt is:
1) Is my reasoning correct, or is there a better way to do it?
2) Is this the only unique solution for the function?
This is incorrect. Your approach is correct if $f$ is equal to its Taylor series, but this is not the case for most smooth functions.
What you can do instead is consider the behavior of $f$ along any line through the origin. Clearly the given homogeneity condition says $f$ is linear when restricted to any line through the origin (keep $(x_1,\dots,x_n)$ fixed and let $\lambda$ vary). Moreover, by computing the directional derivative at $0$ along such a line and using the fact that the directional derivative is the appropriate linear combination of the partial derivatives, you can conclude that in fact $f(x_1,\dots,x_n)=a_1x_1+\dots+a_nx_n$ where the $a_i$ are the partial derivatives of $f$ at $0$.