# How can I get the Green's function of a certain differential equation? [closed]

Ho w to extract the green function of the following differential equation. I am trying to extract the analytical form of the green's function.

\begin{align*} EI_{zz}\,\frac{\partial ^2u\left(x\right)}{\partial x^2}-\lambda u(x)= f\delta(x-z)\\ f=k*u(x),u(0)=0, u(1)=0 \end{align*}

The differential equation represents the free vibration of bar or rod with some spring attachment. where k represents the spring constant and lambda is the frequency parameter. The response for any arbitrary value of k is given by the equation below. \begin{align*} u(x)=k*u(z)*G(x,z,\lambda)\\ \end{align*} but this requires finding $$\lambda$$ for particular value of k. This can be achived with solving for $$\lambda$$ using below equation, by evaluting x=z.

\begin{align*} (1-k*G(z,z,\lambda))*u(z)=0 \end{align*} for this equation we will get $$\lambda$$. And subistiuing $$\lambda$$ in $$u(x)$$ will given the response of the system.

Below is the reference, but it is a fourth-order of the differential as shown in equation 7. And the solution to it is using green's function. ## closed as off-topic by MarcoB, Alex Trounev, LouisB, LCarvalho, bbgodfreyOct 22 at 13:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Alex Trounev, LouisB, LCarvalho, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

• Lookup GreenFunction[] – Ulrich Neumann Oct 10 at 11:20
• I tried that it is not giving any result. GreenFunction[{u''[x] - \[Lambda]u[x], u == 0, u == 0}, u[x], {x, 0, 1}, z] – acoustics Oct 10 at 12:05
• @acoustics that didn't work because you typed \[Lambda]u[x] rather than \[Lambda]*u[x] or \[Lambda] u[x]. – b3m2a1 Oct 10 at 17:02
• Is the $f\delta(x-\zeta)$ a typo? Also, does $*$ mean Times or Convolve? – xzczd Oct 11 at 7:38
• Currently there exist at least unclear 3 points in your question: 1. Why is there a $\zeta$? Is it a typo? 2. Are you sure the Dirac delta function have a coefficient $f$? I won't say I'm good at using Green's function, but according to what I've learned in textbooks and document of GreenFunction, it seems that the right hand side of the PDE should be a Dirac delta function without any coefficient. 3. As already asked in my last comment, what does $*$ mean in your question? Times or Convolve? If the former, then once again, are you sure it's correct? – xzczd Oct 12 at 16:42

Try

GreenFunction[{EI u''[x] - lamda u[x], u == 0, u == 0},u[x], {x, 0, 1}, z]
(*-((E^(-((Sqrt[lamda] (x + z))/Sqrt[
EI])) (E^((2 Sqrt[lamda])/Sqrt[EI]) - E^((2 Sqrt[lamda] x)/Sqrt[
EI])) (-1 + E^((2 Sqrt[lamda] z)/Sqrt[EI])) HeavisideTheta[
x - z])/(
2 (-1 + E^((2 Sqrt[lamda])/Sqrt[EI])) Sqrt[EI] Sqrt[lamda])) - (
E^(-((Sqrt[lamda] (x + z))/Sqrt[
EI])) (-1 + E^((2 Sqrt[lamda] x)/Sqrt[EI])) (E^((2 Sqrt[lamda])/
Sqrt[EI]) - E^((2 Sqrt[lamda] z)/Sqrt[EI])) HeavisideTheta[-x +
z])/(2 (-1 + E^((2 Sqrt[lamda])/Sqrt[EI])) Sqrt[EI] Sqrt[lamda])*)


Mathematica v12 Windows

z =.
q[x_, lamda_, z_] =GreenFunction[{u''[x] - lamda u[x], u == 0, u == 0},u[x], {x, 0, 1}, z]
Plot3D[q[x, lamda, .5], {x, 0, 1}, {lamda, 0, 10}, Exclusions -> None,AxesLabel -> Automatic] There is no solution P==0, 0<x<1 !

• But right-hand side of the equation is Dirac delta function, do we need to put that in equation instead of zero – acoustics Oct 10 at 12:33
• z = 0.5; q = GreenFunction[{u''[x] - \[Lambda] u[x], u == 0, u == 0}, u[x], {x, 0, 1}, z]; P = Simplify[(1 - 10^12*(q /. x -> z))]; NSolve[P == 0 && 0 < \[Lambda] < 10] , I am trying to solve for lambda – acoustics Oct 10 at 12:42
• Some doubts. 1. why you defined z=. 2. And the second one is for different values of lambda I wanted to plot u[x], essentially my lambdas are my eigenvalues and u[x] are my eigenfunctions. 3.u(x)=k*u(z)*g(x,z,lambda), and k is some constant. – acoustics Oct 10 at 15:41
• Some doubts. 1. why you defined z=. 2. And the second one is for different values of lambda I wanted to plot u[x], essentially my lambdas are my eigenvalues and u[x] are my eigenfunctions. 3.u(x)=k*u(z)*g(x,z,lambda), and k is some constant. at  x=z the equation reduces to (1-k*g(z,z,lambda))*u(z)=0. for non-trivial solution (1-k*g(z,z,lambda))=0 from this I extract the roots of lambda. But I am not getting roots of lambda – acoustics Oct 10 at 15:47
• answer 1: z is undefined and only used as third argument of q[x_, lamda_, z_] answer 2 : The plot shows the function over the paramerrange x,lamda (not) answer 3: I don't understand the meaning of u[x] – Ulrich Neumann Oct 10 at 19:45