So i am solving a differential equation which has a delta function.
When i solve the differential equation, the solution comes up with a Heaviside Function for the particular solution of the DiracDelta.
But in the book Arfken, we see that the solution for a modified Helmholtz equation with a delta function is
Equation : p’'[z] - k^2*p[z] = DiracDelta(z-z2)
Solution in Mathematica : constansts + Heaviside Function
Solution in Arfken : Exp[-kAbs[z-z2]]/2k
How do i make sure Mathematica gives me the Arfken result instead of a Heaviside function???
The solution is a Green’s function G{z,z2) = G{z-z2) = G{Z}, with Z = z-z2, which obeys the differential equation
G’'{Z)-k^2 G(Z) = -delta(Z). The minus sign is conventional.
Now we need to determine C[1] and C[2] by the boundary conditions G[Infinity]=G[-Infinity]=0. From the first condition, as Z->+Infinity,
E^(-k Z) becomes negligible, so the asymptotic solution approaches G(Z) = E^(k Z) C[1] - E^(k Z)/{2k).This implies that C[1] = 1/(2k).
Setting C[2]= 0, we find G(Z) = E^(-k Z)/(2k) for Z>0. The second boundary condition leads to E^(k Z)/(2k) for Z<0. Thus the final result is G(Z) = E^(k|Z|)/(2k).
I agree with solution you have given, but how do i implement the same in Mathematica.
Using the solution from this expression, I need to solve more Differential Equations.
I don’t know of any systematic Mathematica procedure for solving this equation. You apparently can’t put in f[Infinity] == 0 as a subsidiary condition. (Machines have not yet completely replaced humans!)