Such expression can be easily proved using implict differention.
⇒ y′ = cos (sin x) cos x
⇒ sec x.y′ = cos (sin x)
again differentiating w.r.t x, we can get
secx y′′ + y′ sec x tan x = – sin (sin x) cos x
⇒ tanx y′ = – y . cos2 x
⇒ y′′ +(tanx) y′ + y cos2x = 0