If, A and B are arbitrary constants then what will be the differential equation of y = Ax + B/x?

(a) x^2 d^2 y/dx^2 – xdy/dx + y = 0

(b) x^2 d^2 y/dx^2 + xdy/dx + y = 0

(c) x^2 d^2 y/dx^2 + xdy/dx – y = 0

(d) x^2 d^2 y/dx^2 – xdy/dx – y = 0

I have been asked this question in quiz.

My doubt is from Linear Second Order Differential Equations topic in section 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

Right answer is (c) x^2 d^2 y/dx^2 + xdy/dx – y = 0

Easiest explanation: Given, y = Ax + B/x

=> xy = Ax^2 + B ……….(1)

Differentiating (1) with respect to x, we get,

d(xy)/dx = d/dx(Ax^2 + B)

or, xdy/dx + y = A * 2x ……….(2)

Differentiating again with respect to x, we get,

x*d^2y/dx^2 + dy/dx + dy/dx = A*2 ……….(3)

Eliminating A from (2) and (3) we get,

x^2 d^2 y/dx^2 + 2xdy/dx = 2Ax [multiplying (3) by x]

or, x^2 d^2 y/dx^2 + 2xdy/dx = xdy/dx + y [using (2)]

or, x^2 d^2 y/dx^2 + xdy/dx – y = 0