Find the general solution of the differential solution \frac{dy}{dx}=2-x+x^3.

(a) x^4-2x^2-4y+C=0

(b) x^4-2x^2+C=0

(c) 2x^2+4x-4y+C=0

(d) x^4-2x^2+4x-4y+C=0

This question was addressed to me in an interview for internship.

Query is from Methods of Solving First Order & First Degree Differential Equations topic in portion Differential Equations of Mathematics – Class 12

NCERT Solutions for Subject Clas 12 Math Select the correct answer from above options

Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

The correct option is (d) x^4-2x^2+4x-4y+C=0

Explanation: Given that, \frac{dy}{dx}=2-x+x^4

Separating the variables, we get

dy=(2-x+x^3)dx

Integrating on both sides, we get

\int dy=\int 2-x+x^3 \,dx

y=2x-\frac{x^2}{2}+\frac{x^4}{4}+C_1

4y=4x-2x^2+x^4+4C1

∴x^4-2x^2+4x-4y+4C1=0

x^4-2x^2+4x-4y+C=0 (where 4C1=C)