The original problem: Verify that $y=-\ln(\sec(x) + \tan(x))\cos(x)$ is a solution to the differential equation $y''+y=\tan(x)$.
I found $y'$ to be... $y'= -(\cos(x)(\sec(x)\tan(x)+(\sec(x))^2)/(\sec(x)+\tan(x)))+(\sin(x)(\ln(\sec(x)+\tan(x))))$
I am not sure how to differentiate the first term in $y'$ and find $y''$.
I'm sorry if I didn't use proper formatting or something, this is my first time using this website and I really need some help. Thanks in advance.
HINT: your first derivative can be simplified into $$y'(x)=\ln \left( {\frac {1+\sin \left( x \right) }{\cos \left( x \right) }} \right) \sin \left( x \right) -1 $$ and $$y''(x)={\frac {1}{\cos \left( x \right) } \left( \ln \left( {\frac {1+\sin \left( x \right) }{\cos \left( x \right) }} \right) \left( \cos \left( x \right) \right) ^{2}+\sin \left( x \right) \right) } $$