# calculus of variations, don"t understand why derivative is calculated this way..

#### thisisjayliu

I am learning calculus of variations and met the following example:
Find the extremal of the functional v[y]= ∫ (12ty+(y’)^2)dt, where y=y(t)
let F= 12ty+(y’)^2, using the Euler rule, we need to calculate the second order derivative of F with respect first to y' and then to t. It is clear that the derivative of F with respect to y' is 2y', why when derive 2y' with respect to t, the answer is 0, rather than 2y'' (since y' should also be a function of t). Some may say that here we treat y as a variable as t, but since y is a function of t, when we change t, won't if affect y'' and thus F ?