Determine the slope of the tangent at the indicated value of x

f(x) = (x) cos^2 x, pie/4

y = (x)(cos^2 x)

by the product rule,
dy/dx = x(2cosx)(-sinx) + cos^2 x
= cosx(cosx - 2xsinx)

when x = π/4 , or 45°
dy/dx = √2/2(√2/2 - π/2(√2/2)
= 1/2 - π/4 <--- slope

when x π/4, y = (π/4)(√2/2)^2 = π/8
so now we have the slope and a point:

y - π/8 = (1/2 - π/4)(x - π/4)
y - π/8 = x/2 - π/8 - (π/4)x + π^2/16
y = (1/2 - π/4)x + π^2/16

looking pretty good here
https://www.wolframalpha.com/input/?i=plot+y+%3D+%281%2F2+-+%CF%80%2F4%29x+%2B+%CF%80%5E2%2F16%2C+y+%3D+xcos%5E2+x+for+x+%3D+0+to+2