We are given the explicit solution to the differential equation:
y=(π2x−1)cosecx
To find p(x), we first need to determine the derivative dxdy of this solution with respect to x. We apply the product rule of differentiation:
dxdy=dxd[π2x−1]⋅cosecx+(π2x−1)⋅dxd[cosecx]
Evaluating the individual derivatives gives:
dxd[π2x−1]=π2
dxd[cosecx]=−cosecxcotx
Substituting these back into our product rule expression yields:
dxdy=π2cosecx−(π2x−1)cosecxcotx
Now, we rewrite the second grouping of terms on the right side by recognizing that our original expression for y is embedded within it:
(π2x−1)cosecx=y
Substituting y directly into the derivative equation simplifies it to:
dxdy=π2cosecx−ycotx
Rearranging the terms by bringing the component containing y over to the left-hand side of the equality:
dxdy+ycotx=π2cosecx
Let us directly compare this structured equation with the standard form of the first-order linear differential equation provided in the question:
dxdy+p(x)y=π2cosecx
By matching the corresponding coefficients of y from both expressions, we can cleanly extract the unknown function:
p(x)=cotx