The differential equation is $\frac{dy}{dx}=3\delta\left(x\right)+y\left(x\right)$. By separation of variables, we have $\frac{dy}{3\delta\left(x\right)+y\left(x\right)}=dx$. Since $\delta\left(x\right)$ is not constant, the left side cannot be equal to $\ln\left(3\delta\left(x\right)+y\left(x\right)\right)$. It seems that $\delta\left(x\right)$ would be better were it on the right side, since $\int\delta\left(x\right)dx=U\left(x\right)$, the unit step function. However, we cannot separate it from $y$. How should we proceed?
Solving $\frac{dy}{dx}=3\delta\left(x\right)+y\left(x\right)$
-
1This is a first-order linear non-homogeneous differential equation and it can be solved by integrating factors. – 2017-01-03
-
1Note that $\frac{dy}{3\delta(x)+y(x)}$ is not a proper separation of variables - the left side is not only in terms of $y$. – 2017-01-03
-
0Is $\delta(x)$ the Dirac delta "function" or and unknown function? My answer assumes it is the Dirac delta "function". The statement that its integral is the unit step supports this. – 2017-01-03
-
0@RossMillikan Yes, it is the Dirac delta "function". – 2017-01-03
2 Answers
Assuming $\delta(x)$ is the Dirac delta "function", $\delta(x)=0$ for $x \neq 0$ means you can solve the equation over $(-\infty, 0)$ and $(0,\infty)$ while ignoring it. You get a different constant of integration on each interval, so have $$y(x)= \begin {cases} Ae^x& x \lt 0\\Be^x & x \gt 0 \end {cases}$$ Now if you integrate with respect to $x$ over a small interval around $x=0$ we can see that $y(0^+)-y(0^-)=3$ so $B=A+3$. Without an initial condition we cannot find either of $A,B$ explicitly.
-
0It is an exercise from _Calculus_ by Gilbert Strang. It does not specify an initial condition, and the answer key said $3e^x\cdot\text{step function}$. But I differentiated it and got $\frac{dy}{dx}=3e^x\left(\delta\left(x\right)+U\left(x\right)\right)=3\left(e^x\delta\left(x\right)+y\left(x\right)\right)$. – 2017-01-03
-
0So the book is assuming $y(0^-)=0$ for the initial condition, which gives $A=0,B=3$. In your second equals, the $3$ should be inside the parentheses. Now away from $x=0$, the first term on the right is zero and can be ignored. At $x=0$, the $e^x$ on the right is $1$, so all is well. – 2017-01-03
-
0Sorry for the mistake. It should be $\frac{dy}{dx}=3e^x\delta(x)+y(x)$. It makes sense to me now. But I have one more question. I am trying to understand your last paragraph. Using @AlgorithmsX's method, I was able to arrive at $y(x)=3e^x\int\delta(x)e^{-x}dx$. Over a very small interval around $x=0$, $e^0=1$ and $\int_{-A}^A\delta(x)e^{-x}dx=e^0=1$. That is why $y(0^+)-y(0^-)=3$. Is this reasoning correct? – 2017-01-03
-
0Yes, that is correct. In general, $\int \delta(x)f(x)=f(0)$ for any interval that crosses zero. You can show that by integrating by parts – 2017-01-03
$$\begin{align}\frac{dy}{dx}-y&=3\delta(x)\\ u(x)&=e^{ \int-\mathrm{d}x }=e^{-x}\\ e^{-x}\frac{dy}{dx}-e^{-x}y&=3\delta(x)e^{-x}\\ (e^{-x}y)'&= 3\delta(x)e^{-x}\tag{Product Rule}\\ \end{align}$$ Integrate both sides, solve for y, and you’re done.
As it says in your comments, this is a First Order Linear Ordinary Differential Equation. Check out that link for more info.
-
0Shouldn't there be $e^{-x}$ on the right side, too? – 2017-01-03
-
0@W.Zhu Thanks. I fixed it. – 2017-01-03