Rank of elliptic curves allied to certain cyclic extensions of degree 4 and 6. The average rank of elliptic curves. I. (With an appendix by Oisín McGuinness: The explicit formula for elliptic curves over function fields) 