I don´t know how to prove that my following algorithm works:
Let $G=(V,E)$ be a graph and $W =(V,T)$ a forest such that for every other forest $\hat W=(V,\hat T)$ and $l: E\rightarrow \mathbb R$ is the cost function for the edges
$$\sum_{e \in T}l(e) \ge \sum_{\hat e \in \hat T}l(\hat e)$$
We call $W$ the maximum forest of the graph $G$
Algorithm: 1: define $\hat l(e)=-l(e)$
2. Compute the minimum spanning tree with respect to $\hat l(e)$ (using Kruskal)
3.Let $F$ be the resulting set of edges of the "maximum" spanning tree
4. Let $S=\{e \in F: l(e)\gt0\}$
5. The graph $(V,S)$ is the maximum forest
$(V,S)$ is obviously a forest since $S$ is a subset of a tree. Intuitively, $(V,S)$ is a maximum forest but I am stuck here.
I think that if my algorithm was correct for any connected Graph $G$ it would also work for any not connected Graph.
Would appreciate any help.