Green Function - 3

logistic_guy

Senior Member
Joined
Apr 17, 2024
Messages
1,610
Solve.

u+1xu1x2u=x,   u(1)=3,   u(2)=1\displaystyle u'' + \frac{1}{x}u' - \frac{1}{x^2}u = x, \ \ \ u(1) = 3, \ \ \ u'(2) = -1
 
First, you have to notice that this is not an initial-value problem as the previous exercises, but rather a boundary-value problem. In other words, each condition starts at different point.

First condition starts at x=1\displaystyle x = 1 while second condition starts at x=2\displaystyle x = 2.

We can solve this problem as before, but we leave the starting limit of integration empty. This is the general solution if we wanna solve it as the previous exercises:

u(x)=c1x+c2x+xx2s22xs ds\displaystyle u(x) = c_1x + \frac{c_2}{x} + \int_{}^{x}\frac{x^2 - s^2}{2x}s \ ds

Here, the green function g(x,s)=x2s22x\displaystyle g(x,s) = \frac{x^2 - s^2}{2x} is called One-Sided Green function.

Boundary-value problems are better solved by Two-Sided Green function.

With Two-Sided Green function, the general solution will look like this:

u(x)=c1x+c2x+12G(x,s)s ds\displaystyle u(x) = c_1x + \frac{c_2}{x} + \int_{1}^{2}G(x,s)s \ ds

where G(x,s)\displaystyle G(x,s) is Two-Sided Green function.

Our goal in this exercise is to learn how to solve boundary-value problems by Two-Sided Green function.

💪🥸🥸
 
Last edited:
It is not a bad idea to get a little help from some one who is faster than you. We start with Mrs. Alpha👩‍🦰

If we let WolframAlpha\displaystyle \text{WolframAlpha} solve this problem, we get:


u(x)=5x457x2+17240x\displaystyle u(x) = \frac{5x^4-57x^2+172}{40x}


We will try to solve this problem by green function and see if our solution matches the solution of Alpha\displaystyle \text{Alpha}.
 
Last edited:
I did some calculations and I have found that the green function for this problem is:

G(x,s)={(s21)(x2+4)10x1sx(x21)(s2+4)10xxs2\displaystyle \large G(x,s) =\begin{cases}-\frac{(s^2 - 1)(x^2 + 4)}{10x} & 1 \leq s \leq x\\[10pt]-\frac{(x^2 - 1)(s^2 + 4)}{10x} & x \leq s \leq 2\end{cases}


In the next posts, we will show in detail how we got this green function. Tighten your seatbelt and get ready!

💪😺😺
 
First let us enjoy seeing the structure of green function.

G(x,s)={u1(s)u2(x)W(s)1sxu1(x)u2(s)W(s)xs2\displaystyle \large G(x,s) =\begin{cases}\frac{u_1(s)u_2(x)}{W(s)} & 1 \leq s \leq x\\[10pt]\frac{u_1(x)u_2(s)}{W(s)} & x \leq s \leq 2\end{cases}

where u1(x)\displaystyle u_1(x) is a solution depends on the homogeneous boundary condition u(1)=0\displaystyle u(1) = 0 and u2(x)\displaystyle u_2(x) depends on u(2)=0\displaystyle u(2) = 0. And W(s)\displaystyle W(s) is the Wronskian of u1(s)\displaystyle u_1(s) and u2(s)\displaystyle u_2(s).
 
u2(x)\displaystyle u_2(x) depends on u(2)=0\displaystyle u(2) = 0.
Oops, u2(x)\displaystyle u_2(x) depends on u(2)=0\displaystyle u'(2) = 0.

We all know that the homogeneous solution (complementary solution) to the OP differential equation is:

u(x)=c1x+c2x\displaystyle u(x) = c_1x + \frac{c_2}{x}

Apply u(1)=0\displaystyle u(1) = 0. (Just remember that we are applying homogeneous conditions and not the actual conditions because green function depends on homogeneous conditions.)

0=c1+c2\displaystyle 0 = c_1 + c_2

If we choose c1=1\displaystyle c_1 = 1 and c2=1\displaystyle c_2 = -1, the first condition will be satisfied.

Then,

u1(x)=x1x\displaystyle u_1(x) = x - \frac{1}{x}

Apply u(2)=0\displaystyle u'(2) = 0 again to u(x)\displaystyle u(x).

0=c1c24\displaystyle 0 = c_1 - \frac{c_2}{4}

If we choose c1=1\displaystyle c_1 = 1 and c2=4\displaystyle c_2 = 4, the second condition will be satisfied.

Then,

u2(x)=x+4x\displaystyle u_2(x) = x + \frac{4}{x}
 
It's time to find the Wronskian.

W(s)=W(u1,u2)=u1(s)u2(s)u1(s)u2(s)=s1ss+4s1+1s214s2=10s\large W(s) = W(u_1,u_2)\displaystyle = \left| \begin{matrix} u_1(s) & u_2(s) \\[10pt] u'_1(s) & u'_2(s) \end{matrix} \right| = \left| \begin{matrix} s - \frac{1}{s} & s + \frac{4}{s} \\[10pt] 1 + \frac{1}{s^2} & 1 - \frac{4}{s^2} \end{matrix} \right| = -\frac{10}{s}
 
Let us fill the gaps of green function.


G(x,s)={(s1s)(x+4x)(10s)1sx(x1x)(s+4s)(10s)xs2\displaystyle \large G(x,s) =\begin{cases}\frac{\left(s - \frac{1}{s}\right)\left(x + \frac{4}{x}\right)}{\left(-\frac{10}{s}\right)} & 1 \leq s \leq x\\[10pt]\frac{\left(x - \frac{1}{x}\right)\left(s + \frac{4}{s}\right)}{\left(-\frac{10}{s}\right)} & x \leq s \leq 2\end{cases}
 
Let us fill the gaps of green function.


G(x,s)={(s1s)(x+4x)(10s)1sx(x1x)(s+4s)(10s)xs2\displaystyle \large G(x,s) =\begin{cases}\frac{\left(s - \frac{1}{s}\right)\left(x + \frac{4}{x}\right)}{\left(-\frac{10}{s}\right)} & 1 \leq s \leq x\\[10pt]\frac{\left(x - \frac{1}{x}\right)\left(s + \frac{4}{s}\right)}{\left(-\frac{10}{s}\right)} & x \leq s \leq 2\end{cases}
With a little simplification, green function becomes:


G(x,s)={(s21)(x2+4)10x1sx(x21)(s2+4)10xxs2\displaystyle \large G(x,s) =\begin{cases}-\frac{(s^2 - 1)(x^2 + 4)}{10x} & 1 \leq s \leq x\\[10pt]-\frac{(x^2 - 1)(s^2 + 4)}{10x} & x \leq s \leq 2\end{cases}
 
Our solution so far is:

u(x)=c1x+c2x+12G(x,s)s ds\displaystyle u(x) = c_1x + \frac{c_2}{x} + \int_{1}^{2}G(x,s)s \ ds

Or

u(x)=c1x+c2x+1x(s21)(x2+4)10xs ds+x2(x21)(s2+4)10xs ds\displaystyle u(x) = c_1x + \frac{c_2}{x} + \int_{1}^{x}-\frac{(s^2 - 1)(x^2 + 4)}{10x}s \ ds + \int_{x}^{2}-\frac{(x^2 - 1)(s^2 + 4)}{10x}s \ ds

Or

u(x)=c1x+c2xx2+410x1x(s3s) dsx2110xx2(s3+4s) ds\displaystyle u(x) = c_1x + \frac{c_2}{x} - \frac{x^2 + 4}{10x}\int_{1}^{x}(s^3 - s) \ ds - \frac{x^2 - 1}{10x}\int_{x}^{2}(s^3 + 4s) \ ds
 
To find the constants c1\displaystyle c_1 and c2\displaystyle c_2, we apply the boundary conditions u(1)=3\displaystyle u(1) = 3 and u(2)=1\displaystyle u'(2) = -1 on the solution u(x)=c1x+c2x\displaystyle u(x) = c_1x + \frac{c_2}{x}.

Apply u(1)=3\displaystyle u(1) = 3.

3=c1+c2\displaystyle 3 = c_1 + c_2

Apply u(2)=1\displaystyle u'(2) = -1.

1=c1c24=c13c14\displaystyle -1 = c_1 - \frac{c_2}{4} = c_1 - \frac{3 - c_1}{4}

4=4c13+c1\displaystyle -4 = 4c_1 - 3 + c_1

This gives:

c1=15\displaystyle c_1 = -\frac{1}{5}

Then,

3=15+c2\displaystyle 3 = -\frac{1}{5} + c_2

This gives:

c2=3+15=155+15=165\displaystyle c_2 = 3 + \frac{1}{5} = \frac{15}{5} + \frac{1}{5} = \frac{16}{5}


Our solution so far is:

u(x)=x5+165xx2+410x1x(s3s) dsx2110xx2(s3+4s) ds\displaystyle u(x) = -\frac{x}{5} + \frac{16}{5x} - \frac{x^2 + 4}{10x}\int_{1}^{x}(s^3 - s) \ ds - \frac{x^2 - 1}{10x}\int_{x}^{2}(s^3 + 4s) \ ds
 
Let us try to solve the first integral.

1x(s3s) ds=s44s221x=(x44x22)(1412)=x44x22+14\displaystyle \int_{1}^{x}(s^3 - s) \ ds = \frac{s^4}{4} - \frac{s^2}{2}\bigg |_{1}^{x} = \left(\frac{x^4}{4} - \frac{x^2}{2}\right) - \left(\frac{1}{4} - \frac{1}{2}\right) = \frac{x^4}{4} - \frac{x^2}{2} + \frac{1}{4}


Our solution so far is:

u(x)=x5+165xx2+410x(x44x22+14)x2110xx2(s3+4s) ds\displaystyle u(x) = -\frac{x}{5} + \frac{16}{5x} - \frac{x^2 + 4}{10x}\left(\frac{x^4}{4} - \frac{x^2}{2} + \frac{1}{4}\right) - \frac{x^2 - 1}{10x}\int_{x}^{2}(s^3 + 4s) \ ds
 
Let us solve the second integral.

x2(s3+4s) ds=s44+4s22x2=(4+8)(x44+2x2)=12x442x2\displaystyle \int_{x}^{2}(s^3 + 4s) \ ds = \frac{s^4}{4} + \frac{4s^2}{2}\bigg |_{x}^{2} = (4 + 8) - \left(\frac{x^4}{4} + 2x^2\right) = 12 - \frac{x^4}{4} - 2x^2


Our solution so far is:

u(x)=x5+165xx2+410x(x44x22+14)x2110x(12x442x2)\displaystyle u(x) = -\frac{x}{5} + \frac{16}{5x} - \frac{x^2 + 4}{10x}\left(\frac{x^4}{4} - \frac{x^2}{2} + \frac{1}{4}\right) - \frac{x^2 - 1}{10x}\left(12 - \frac{x^4}{4} - 2x^2\right)
 
Simplify the third term.

x2+410x(x44x22+14)=x540x320+7x40110x\displaystyle - \frac{x^2 + 4}{10x}\left(\frac{x^4}{4} - \frac{x^2}{2} + \frac{1}{4}\right) = -\frac{x^5}{40} - \frac{x^3}{20} + \frac{7x}{40} - \frac{1}{10 x}


Our solution so far is:

u(x)=x5+165xx540x320+7x40110xx2110x(12x442x2)\displaystyle u(x) = -\frac{x}{5} + \frac{16}{5x} -\frac{x^5}{40} - \frac{x^3}{20} + \frac{7x}{40} - \frac{1}{10 x}- \frac{x^2 - 1}{10x}\left(12 - \frac{x^4}{4} - 2x^2\right)
 
Simplify the last term.

x2110x(12x442x2)=x540+7x3407x5+65x\displaystyle -\frac{x^2 - 1}{10x}\left(12 - \frac{x^4}{4} - 2x^2\right) = \frac{x^5}{40} + \frac{7x^3}{40} - \frac{7x}{5} + \frac{6}{5x}


Our solution so far is:

u(x)=x5+165xx540x320+7x40110x+x540+7x3407x5+65x\displaystyle u(x) = -\frac{x}{5} + \frac{16}{5x} -\frac{x^5}{40} - \frac{x^3}{20} + \frac{7x}{40} - \frac{1}{10 x} + \frac{x^5}{40} + \frac{7x^3}{40} - \frac{7x}{5} + \frac{6}{5x}
 
Simplify further.

x5+165xx540x320+7x40110x+x540+7x3407x5+65x\displaystyle -\frac{x}{5} + \frac{16}{5x} -\frac{x^5}{40} - \frac{x^3}{20} + \frac{7x}{40} - \frac{1}{10 x} + \frac{x^5}{40} + \frac{7x^3}{40} - \frac{7x}{5} + \frac{6}{5x}


=x3857x40+4310x\displaystyle = \frac{x^3}{8} - \frac{57x}{40} + \frac{43}{10 x}


Our solution so far is:

u(x)=x3857x40+4310x\displaystyle u(x) = \frac{x^3}{8} - \frac{57x}{40} + \frac{43}{10 x}
 
My solution is:

u(x)=x3857x40+4310x\displaystyle \large u(x) = \frac{x^3}{8} - \frac{57x}{40} + \frac{43}{10 x}


WolframAlpha\displaystyle \text{WolframAlpha}'s solution is:

u(x)=5x457x2+17240x\displaystyle \large u(x) = \frac{5x^4-57x^2+172}{40x}


I will leave it for the audience\displaystyle \text{audience} as an exercise to decide if they are equal.
 
Top