User:Egm6321.f11.team1/report5.bensplaypen.R*5.5

=Problem 2 - Solving Euler's 2nd-order differential equation using the method of trial solution=

Given
A second order linear ordinary differential equation with varying coefficients (L2-ODE-VC)

With Boundary Coditions,

Find
The solution using the method of trial solution

==Solution  == Let trial solution be

where r is constant. Then

(2.4) substitute into (2.1)

and yields,

A homogeneous solution take this form of

Therefore two roots,

Hence the general solution is

With the given boundary conditions, we get

Solving this gives c1=-6.5 and c2=4.5, therefore the solution of this BVP is

Plot homogeneous solution



Matlab code: hw5_problem2.m

Given
The Euler L2_ODE_VC:

The Euler L2_ODE_CC:

And the characteristic equation

Find
1.1) $$ \begin{align}{{a}_{2}},{{a}_{1}},{{a}_{0}} \end{align}$$ such that equation 3.3 is the characteristic equation of 3.1.

1.2) The 1st homogeneous solution

1.3) The second homogeneous solution

1.4) The general homogeneous solution

2.1) $$ \begin{align}{{b}_{2}},{{b}_{1}},{{b}_{0}} \end{align}$$ such that equation 3.3 is the characteristic equation of 3.2.

2.2) The 1st homogeneous solution

2.3) The 2nd homogeneous solution

2.4) The general homogeneous solution

1.1
The coefficients of 3.1 can be found by using the trial solution method. The trial solution for the Euler equation with variable coefficient is:

The derivatives of the trial solution is defined as:

Substituting the equations 3.1.1, 3.1.2 and 3.1.3 into 3.1 we get:

Therefore we need to solve the following equation to find the coefficients:

Comparing the equation 3.1.7 to the equation 3.3 we have:

Therefore, comparing the coefficients of both side of the equation 3.1.8 we get:

1.2
From the item 1.1, the characteristic equation of 3.1 is 3.3. Therefore, for 3.3 there are two identical roots equals to $$ \begin{align}r= \lambda \end{align}$$. The 1st homogeneous solution can be calculated by:

1.3
Since $$ \begin{align}\lambda \end{align}$$ has two identical roots the second homogeneous solution can be calculate using the form:

Calculating the derivatives of 3.1.17:

Substituting 3.1.17, 3.1.18 and 3.1.19 into 3.1 we have:

Rearranging the terms of 3.1.20:

The equation 3.1.21 is simplified as:

Substituting the coefficients $$ \begin{align}{{a}_{2}} \end{align}$$ (equation 3.1.10), $$ \begin{align}{{a}_{1}} \end{align}$$ (equation 3.1.13), $$ \begin{align}{{a}_{0}} \end{align}$$ (equation 3.1.14) and the 1st homogeneous solution with the respective derivatives presented in $$ \begin{align}{{y}_{1}} \end{align}$$ (equation 3.1.1), $$ \begin{align}{{y}_{1}}' \end{align}$$ (equation 3.1.2) and $$ \begin{align}{{y}_{1}}'' \end{align}$$ (equation 3.1.13), where r is replaced by $$ \begin{align}\lambda  \end{align}$$ into 3.1.22:

Therefore we will solve for:

Using the reduction of order:

Substituting 3.1.28 into 3.1.29:

Integrating both sides of 3.1.32:

Using the exponential function in 3.1.34

Where $$ \begin{align}{{k}_{2}} \end{align}$$ can be written as:

Therefore, z(x) can be written as:

Since the order of U(x) was reduced, we can get U(x) by integrating 3.1.38

Finally, substituting 3.1.42 and 3.1.16 into 3.1.17 the 2nd homogeneous solution is defined as:

1.4
The generalized homogeneous solution can be calculated by using the following equation:

Substituting equations 3.1.16 and 3.1.43 into 3.1.44 we have:

Rearranging the constants from equation 3.1.47, the generalized homogeneous solution can be expressed as:

2.1
The coefficients of 3.2 can be found by using the trial solution method. The trial solution for the Euler equation with constant coefficient is:

The derivatives of the trial solution is defined as:

Substituting the equations 3.2.1, 3.2.2 and 3.2.3 into 3.2 we get:

Therefore we need to solve the following equation to find the coefficients:

Comparing the equation 3.2.6 to the equation 3.3 we have:

Therefore, comparing the coefficients of both side of the equation 3.2.7 we get:

2.2
From the item 2.1, the characteristic equation of 3.2 is 3.3. Therefore, for 3.3 there are two identical roots equals to $$ \begin{align}r=\lambda  \end{align}$$. The 1st homogeneous solution can be calculated by:

2.3
Since $$ \begin{align}\lambda \end{align}$$ has two identical roots the 2nd homogeneous solution can be calculate using the form:

Calculating the derivatives of 3.2.15:

Substituting 3.1.15, 3.1.16 and 3.1.17 into 3.2 we have:

Rearranging the terms of 3.2.18:

The equation 3.2.19 is simplified as:

Substituting the coefficients $$ \begin{align}{{b}_{2}} \end{align}$$ (equation 3.2.9), $$ \begin{align}{{b}_{1}} \end{align}$$ (equation 3.2.11), $$ \begin{align}{{b}_{0}} \end{align}$$ (equation 3.2.12) and the 1st homogeneous solution with the respective derivatives presented in $$ \begin{align}{{y}_{1}} \end{align}$$ (equation 3.2.1), $$ \begin{align}{{y}_{1}}' \end{align}$$ (equation 3.2.2) and $$ \begin{align}{{y}_{1}}'' \end{align}$$ (equation 3.2.3), where r is replaced by $$ \begin{align}\lambda  \end{align}$$, into 3.2.20:

Therefore we need to solve for:

Integrating both sides of 3.2.24 we have:

Integrating 3.2.25 we have U(x) as:

Finally, substituting 3.2.26 and 3.2.14 into 3.2.15 the 2nd homogeneous solution is defined as:

2.4
The generalized homogeneous solution can be calculated by using the following equation:

Substituting equations 3.2.14 and 3.2.27 into 3.2.28 we have:

Rearranging the constants from equation 3.2.31, the generalized homogeneous solution can be expressed as: