Step 1: Write equation of a straight line with slope form.
General line:
\[
y=mx+c
\]
Step 2: Condition for tangency with circle \(x^2+y^2=a^2\).
Distance of line from origin must be \(a\):
\[
\frac{|c|}{\sqrt{1+m^2}}=a
\Rightarrow c^2=a^2(1+m^2)
\]
Step 3: Express \(c\) in terms of \(x,y,m\).
From line:
\[
c=y-mx
\]
Step 4: Substitute into tangency condition.
\[
(y-mx)^2=a^2(1+m^2)
\]
Step 5: Replace \(m\) by \(\frac{dy}{dx}\).
Since \(m\) is slope:
\[
m=\frac{dy}{dx}
\]
So differential equation becomes:
\[
\left(y-x\frac{dy}{dx}\right)^2
=a^2\left[1+\left(\frac{dy}{dx}\right)^2\right]
\]
Final Answer:
\[
\boxed{\left(y-x\frac{dy}{dx}\right)^2=a^2\left[1+\left(\frac{dy}{dx}\right)^2\right]}
\]