L=1;
α=1;

Table[Integrate[(2/L)(300+28((Cos[((π x)/L)])^3))Cos[((n π x)/L)],{x,0,L}],{n,0,10}]

(*Our inital condition*)
f0[x_]:=300+28((Cos[((π x)/L)])^3)
Plot[f0[x],{x,0,L}]

(*Form of our solution at t=0*)
m=3;
HoldForm[Sum[(Subscript[A, n])Cos[((n π x)/L)],{n,0,∞}]]
Sum[(Subscript[A, n])Cos[((n π x)/L)],{n,0,m}]

(*Recall orthogonality relations
∫(2/L)cos(((n π x)/L))cos(((np π x)/L))dx=(Subscript[δ, n,np])
*)
Simplify[(2/L)Integrate[Cos[((n π x)/L)]Cos[((np π x)/L)],{x,0,L}],Assumptions->And[n∈Integers,np∈Integers]](*n≠np*)
Simplify[(2/L)Integrate[Cos[((n π x)/L)]Cos[((n π x)/L)],{x,0,L}],Assumptions->n∈Integers](*n=np*)

(*Use orthogonality to find coefficients*)
a[n_]:=(2/L)Integrate[Cos[((n π x)/L)]f0[x],{x,0,L}];
a[n]

(*This expression is undefined for n=0,1 and 3, so we can use L'Hospitals Rule to solve:*)

Table[Limit[a[n],n->m],{m,0,10}]

(*Putting together the full solution*)
u[x_,t_]:=(600/2)+21Cos[((π x)/L)]Exp[-α ((π^2)/(L^2))t]+7Cos[((3π x)/L)]Exp[-α (((3^2)(π^2))/(L^2))t]

(*Check the initial condition*)
Plot[Evaluate[u[x,0]],{x,0,L}]

(*Animate A Plot*)
Animate[Plot[Evaluate[u[x,t]],{x,0,L},PlotRange->{270,330}],{t,0,0.2}]

Sense-making commentary: At t = 0, the shape of the animation matches the initial condition, as expected.  Note that this function is somewhat wiggly, as it includes substantial contributions from both the Cos[Pi x/L] and the Cos[3Pi x/L] terms.  As time progresses, you will observe that the function quickly loses much of this wiggliness, and comes to look like only the Cos[Pi x/L] term, with very little contribution from the n = 3 term (for our chosen values, check t ~ 0.02).  What is happening???  Looking back at the full solution u[x,t], we see that each term is multiplied by a time-dependent exponential with a negative exponent.  What’s more, the n = 3 term has a negative exponent that is NINE times greater than the n = 1 term, so this exponential goes to 0 much faster than the n = 1 case.  The shape of the function at this instant in time therefore makes sense!  Letting time proceed further, we find that the temperature of the function becomes roughly uniform at 300 Kelvin.  Again, this makes sense--all the spatial dependence is in the two cosine terms, and each of them eventually gets multiplied by a decaying exponential that goes to zero.

Does all of this make sense physically as well as mathematically?  Well, physically, when the temperature difference between two things is higher, heat is transferred between them more quickly, and their temperature changes more quickly.  The high “wiggliness” of the Cos[3Pi x/L] term really is a high temperature difference between adjacent points on the metal rod.  That this wiggliness gets smoothed out very quickly is exactly the same as stating that heat will flow quickly from a very high to a very low temperature.  This also accounts for the behavior after a long time: the ends of the rod are insulated, so no heat can enter or leave the rod itself.  Heat is still going to flow throughout the rod whenever one part of the rod is hotter than another, so the only possible end state is that the rod ends up at a uniform temperature!