Solving differential equations with undetermined coefficients. Homogeneous second order differential equations with constant coefficients

Fundamentals of solving linear inhomogeneous differential equations of the second order (LNDU-2) with constant coefficients(PC)

A 2nd order LDDE with constant coefficients $p$ and $q$ has the form $y""+p\cdot y"+q\cdot y=f\left(x\right)$, where $f\left(x \right)$ is a continuous function.

Regarding LNDU 2 with PC, the following two statements are true.

Let us assume that some function $U$ is an arbitrary partial solution of an inhomogeneous differential equation. Let us also assume that some function $Y$ is the general solution (GS) of the corresponding linear homogeneous differential equation (LODE) $y""+p\cdot y"+q\cdot y=0$. Then the GS of LHDE-2 is equal to the sum of the indicated private and general solutions, that is, $y=U+Y$.

If the right-hand side of a 2nd order LMDE is a sum of functions, that is, $f\left(x\right)=f_(1) \left(x\right)+f_(2) \left(x\right)+. ..+f_(r) \left(x\right)$, then first we can find the PDs $U_(1) ,U_(2) ,...,U_(r)$ that correspond to each of the functions $f_( 1) \left(x\right),f_(2) \left(x\right),...,f_(r) \left(x\right)$, and after that write the CR LNDU-2 in the form $U=U_(1) +U_(2) +...+U_(r) $.

Solution of 2nd order LPDE with PC

It is obvious that the type of one or another PD $U$ of a given LNDU-2 depends on the specific form of its right-hand side $f\left(x\right)$. The simplest cases of searching for PD LNDU-2 are formulated in the form of the following four rules.

Rule #1.

The right side of LNDU-2 has the form $f\left(x\right)=P_(n) \left(x\right)$, where $P_(n) \left(x\right)=a_(0) \cdot x^(n) +a_(1) \cdot x^(n-1) +...+a_(n-1) \cdot x+a_(n) $, that is, it is called a polynomial of degree $n$. Then its PD $U$ is sought in the form $U=Q_(n) \left(x\right)\cdot x^(r) $, where $Q_(n) \left(x\right)$ is another polynomial of that the same degree as $P_(n) \left(x\right)$, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2 that are equal to zero. The coefficients of the polynomial $Q_(n) \left(x\right)$ are found by the method of indefinite coefficients (UK).

Rule No. 2.

The right side of LNDU-2 has the form $f\left(x\right)=e^(\alpha \cdot x) \cdot P_(n) \left(x\right)$, where $P_(n) \left( x\right)$ is a polynomial of degree $n$. Then its PD $U$ is sought in the form $U=Q_(n) \left(x\right)\cdot x^(r) \cdot e^(\alpha \cdot x) $, where $Q_(n) \ left(x\right)$ is another polynomial of the same degree as $P_(n) \left(x\right)$, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2 equal to $\alpha $. The coefficients of the polynomial $Q_(n) \left(x\right)$ are found by the NC method.

Rule No. 3.

The right side of LNDU-2 has the form $f\left(x\right)=a\cdot \cos \left(\beta \cdot x\right)+b\cdot \sin \left(\beta \cdot x\right) $, where $a$, $b$ and $\beta$ are known numbers. Then its PD $U$ is sought in the form $U=\left(A\cdot \cos \left(\beta \cdot x\right)+B\cdot \sin \left(\beta \cdot x\right)\right )\cdot x^(r) $, where $A$ and $B$ are unknown coefficients, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2, equal to $i\cdot \beta $. The coefficients $A$ and $B$ are found using the non-destructive method.

Rule No. 4.

The right side of LNDU-2 has the form $f\left(x\right)=e^(\alpha \cdot x) \cdot \left$, where $P_(n) \left(x\right)$ is a polynomial of degree $ n$, and $P_(m) \left(x\right)$ is a polynomial of degree $m$. Then its PD $U$ is sought in the form $U=e^(\alpha \cdot x) \cdot \left\cdot x^(r) $, where $Q_(s) \left(x\right)$ and $ R_(s) \left(x\right)$ are polynomials of degree $s$, the number $s$ is the maximum of two numbers $n$ and $m$, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2, equal to $\alpha +i\cdot \beta $. The coefficients of the polynomials $Q_(s) \left(x\right)$ and $R_(s) \left(x\right)$ are found by the NC method.

The NK method consists of applying the following rule. In order to find the unknown coefficients of the polynomial that are part of the partial solution of the inhomogeneous differential equation LNDU-2, it is necessary:

  • substitute the PD $U$ written in general view, to the left side of LNDU-2;
  • on the left side of LNDU-2, perform simplifications and group terms with the same powers $x$;
  • in the resulting identity, equate the coefficients of terms with the same powers $x$ of the left and right sides;
  • solve the resulting system linear equations relative to unknown coefficients.

Example 1

Task: find OR LNDU-2 $y""-3\cdot y"-18\cdot y=\left(36\cdot x+12\right)\cdot e^(3\cdot x) $. Find also PD , satisfying the initial conditions $y=6$ for $x=0$ and $y"=1$ for $x=0$.

We write down the corresponding LOD-2: $y""-3\cdot y"-18\cdot y=0$.

Characteristic equation: $k^(2) -3\cdot k-18=0$. Roots of the characteristic equation: $k_(1) =-3$, $k_(2) =6$. These roots are valid and distinct. Thus, the OR of the corresponding LODE-2 has the form: $Y=C_(1) \cdot e^(-3\cdot x) +C_(2) \cdot e^(6\cdot x) $.

The right side of this LNDU-2 has the form $\left(36\cdot x+12\right)\cdot e^(3\cdot x) $. It is necessary to consider the coefficient of the exponent $\alpha =3$. This coefficient does not coincide with any of the roots of the characteristic equation. Therefore, the PD of this LNDU-2 has the form $U=\left(A\cdot x+B\right)\cdot e^(3\cdot x) $.

We will search for the coefficients $A$, $B$ using the NC method.

We find the first derivative of the Czech Republic:

$U"=\left(A\cdot x+B\right)^((") ) \cdot e^(3\cdot x) +\left(A\cdot x+B\right)\cdot \left( e^(3\cdot x) \right)^((") ) =$

$=A\cdot e^(3\cdot x) +\left(A\cdot x+B\right)\cdot 3\cdot e^(3\cdot x) =\left(A+3\cdot A\ cdot x+3\cdot B\right)\cdot e^(3\cdot x) .$

We find the second derivative of the Czech Republic:

$U""=\left(A+3\cdot A\cdot x+3\cdot B\right)^((") ) \cdot e^(3\cdot x) +\left(A+3\cdot A\cdot x+3\cdot B\right)\cdot \left(e^(3\cdot x) \right)^((") ) =$

$=3\cdot A\cdot e^(3\cdot x) +\left(A+3\cdot A\cdot x+3\cdot B\right)\cdot 3\cdot e^(3\cdot x) =\left(6\cdot A+9\cdot A\cdot x+9\cdot B\right)\cdot e^(3\cdot x) .$

We substitute the functions $U""$, $U"$ and $U$ instead of $y""$, $y"$ and $y$ into the given NLDE-2 $y""-3\cdot y"-18\cdot y=\left(36\cdot x+12\right)\cdot e^(3\cdot x). $ Moreover, since the exponent $e^(3\cdot x) $ is included as a factor in all components, then its can be omitted. We get:

$6\cdot A+9\cdot A\cdot x+9\cdot B-3\cdot \left(A+3\cdot A\cdot x+3\cdot B\right)-18\cdot \left(A\ cdot x+B\right)=36\cdot x+12.$

We perform the actions on the left side of the resulting equality:

$-18\cdot A\cdot x+3\cdot A-18\cdot B=36\cdot x+12.$

We use the NDT method. We obtain a system of linear equations with two unknowns:

$-18\cdot A=36;$

$3\cdot A-18\cdot B=12.$

The solution to this system is: $A=-2$, $B=-1$.

PD $U=\left(A\cdot x+B\right)\cdot e^(3\cdot x) $ for our problem looks like this: $U=\left(-2\cdot x-1\right) \cdot e^(3\cdot x) $.

The OR $y=Y+U$ for our problem looks like this: $y=C_(1) \cdot e^(-3\cdot x) +C_(2) \cdot e^(6\cdot x) +\ left(-2\cdot x-1\right)\cdot e^(3\cdot x) $.

In order to search for a PD that satisfies the given initial conditions, we find the derivative $y"$ of the OP:

$y"=-3\cdot C_(1) \cdot e^(-3\cdot x) +6\cdot C_(2) \cdot e^(6\cdot x) -2\cdot e^(3\ cdot x) +\left(-2\cdot x-1\right)\cdot 3\cdot e^(3\cdot x) .$

We substitute into $y$ and $y"$ the initial conditions $y=6$ for $x=0$ and $y"=1$ for $x=0$:

$6=C_(1) +C_(2) -1; $

$1=-3\cdot C_(1) +6\cdot C_(2) -2-3=-3\cdot C_(1) +6\cdot C_(2) -5.$

We received a system of equations:

$C_(1) +C_(2) =7;$

$-3\cdot C_(1) +6\cdot C_(2) =6.$

Let's solve it. We find $C_(1) $ using Cramer's formula, and $C_(2) $ we determine from the first equation:

$C_(1) =\frac(\left|\begin(array)(cc) (7) & (1) \\ (6) & (6) \end(array)\right|)(\left|\ begin(array)(cc) (1) & (1) \\ (-3) & (6) \end(array)\right|) =\frac(7\cdot 6-6\cdot 1)(1\ cdot 6-\left(-3\right)\cdot 1) =\frac(36)(9) =4; C_(2) =7-C_(1) =7-4=3.$

Thus, the PD of this differential equation has the form: $y=4\cdot e^(-3\cdot x) +3\cdot e^(6\cdot x) +\left(-2\cdot x-1\right )\cdot e^(3\cdot x) $.

Homogeneous linear differential equations second order with constant coefficients have the form

where p and q are real numbers. Let's look at examples of how homogeneous second-order differential equations with constant coefficients are solved.

The solution of a second order linear homogeneous differential equation depends on the roots of the characteristic equation. The characteristic equation is the equation k²+pk+q=0.

1) If the roots of the characteristic equation are different real numbers:

then the general solution of a second order linear homogeneous differential equation with constant coefficients has the form

2) If the roots of the characteristic equation are equal real numbers

(for example, with a discriminant equal to zero), then the general solution of a homogeneous second-order differential equation is

3) If the roots of the characteristic equation are complex numbers

(for example, with a discriminant equal to a negative number), then the general solution of a homogeneous second-order differential equation is written in the form

Examples of solving linear homogeneous second order differential equations with constant coefficients

Find general solutions of homogeneous second order differential equations:

We make up the characteristic equation: k²-7k+12=0. Its discriminant is D=b²-4ac=1>0, so the roots are different real numbers.

Hence, the general solution of this homogeneous 2nd order DE is

Let's compose and solve the characteristic equation:

The roots are real and distinct. Hence we have a general solution to this homogeneous differential equation:

In this case, the characteristic equation

The roots are different and valid. Therefore, the general solution to the homogeneous differential equation of the 2nd order is here

Characteristic equation

Since the roots are real and equal, for this differential equation we write the general solution as

The characteristic equation is here

Since the discriminant is negative number, the roots of the characteristic equation are complex numbers.

The general solution of this homogeneous second-order differential equation has the form

Characteristic equation

From here we find the general solution to this differential. equations:

Examples for self-test.

Where p And q- are arbitrary real numbers, and the function f(x)- continuous on the integration interval X.

Let us express a theorem showing the form in which it is necessary to find the general solution is a linear inhomogeneous differential equation.

Theorem.

General solution on the interval X linear inhomogeneous differential equation: with continuous ones on the integration interval X coefficients and continuous function f(x) equal to the sum of the general solution y 0 appropriate linear inhomogeneous differential equation and any particular solution of the original inhomogeneous equation, i.e., .

So, the general solution LNDU 2nd order with constant coefficients is the sum of the general solution of the corresponding linear homogeneous differential equation of the 2nd order with constant coefficients and a particular solution: .

Calculation y 0 linear homogeneous differential equations of the second order with constant coefficients are described in the article, now we will consider the method of finding.

There are some methods for determining a particular solution of a linear inhomogeneous differential equation of the 2nd order with constant coefficients. These methods are defined taking into account the type of function f(x), which is on the right side of the equation. Let's name them and in subsequent articles we will consider solutions to each second-order LDDE with constant coefficients:

2. If the function f(x) is represented by the product of a polynomial of degree n and exhibitors , which means that a particular solution to a linear inhomogeneous second-order differential equation is found as ,

Where Qn(x) is a polynomial n-th degree,

r- the number of roots of the characteristic equation that equal .

Polynomial coefficients Qn(x) can be determined from the equality .

3. If the function f(x) looks like this: where A 1 And B 1 turn out to be numbers, which means that a particular solution to a linear indefinite differential equation is represented as ,

Where A And IN are undetermined coefficients,

r- is the number of complex conjugate pairs of roots of the characteristic equation that are equal to . Polynomial coefficients A And IN are determined based on equality .

4. If , then ,

Where r is the number of complex conjugate pairs of roots of the characteristic equation, which are equal to ,

Pn(x),Qk(x), Lm(x) And Nm(x) are polynomials of degree n, k, m And m respectively, m = max(n, k).

Find coefficients of polynomials Lm(x) And Nm(x) you can use equality .

5. For all other types of functions f(x) The following procedure is used:

  • the first step is to determine the general solution of the required linear homogeneous equation as y 0 = C 1 ⋅ y 1 + C 2 ⋅ y 2, Where y 1 And y 2 are linearly independent partial solutions of a linear homogeneous differential equation, and C 1 And C 2 are arbitrary constants;
  • Next we vary arbitrary constants, i.e., as a general solution to the original linear inhomogeneous differential equation we accept y = C 1 (x) ⋅ y 1 + C 2 (x) ⋅ y 2;
  • and the last step is to determine the derivatives of the functions C 1 (x) And C 2 (x) from the system of equations:

,

and functions C 1 (x) And C2(x) determined upon further integration.

Inhomogeneous equation with constant coefficients

can be solved using the method of undetermined coefficients and the method of variation of arbitrary constants.

Uncertain coefficient method

I . Because equation (11) is inhomogeneous, its general solution will consist of the sum of the general homogeneous and particular inhomogeneous equations, i.e.

.

We compose the corresponding homogeneous equation

Its characteristic equation

the structure of the fundamental system of solutions depends on the type of roots of the characteristic equation (13).

There are 3 cases.

A). All roots of the characteristic equation (13) are different and real. Let's denote them
. Fundamental system of solutions:

and the general solution has the form:

b). All roots of the characteristic equation (13) are different, but among them there are complex ones. Let
- complex root of equation (13). Then
- is also the root of this equation. These roots correspond to two linearly independent partial solutions:

.

If
And
then the particular solutions will have the form

By writing linearly independent partial solutions corresponding to other conjugate pairs complex roots and all real roots and making a linear combination of these solutions with arbitrary constant coefficients, we obtain a general solution to equation (12).

V). Among the roots of the characteristic equation there are multiples. Let k 1 real r- multiple root. Then they correspond to him r

If
- complex roots of equation (13) multiplicity r, then they correspond to 2 r linearly independent partial solutions of the form:

By writing linearly independent partial solutions of the indicated type, corresponding to all simple and multiple real roots, as well as conjugate pairs of simple and multiple complex roots, we obtain a fundamental system of solutions.

II . Based on the form of the right-hand side of equation (11), a particular solution to the inhomogeneous equation is selected.

There may be cases.

1).
, Where P(x) – polynomial from x degrees n.

A). If the number 0 is not a root of the characteristic equation (13), then a particular solution to the inhomogeneous equation (11) can be found in the form
, Where Q(x) – polynomial from x the same degree n, as P(x) in general form (i.e. with undetermined coefficients).

For example,

b). If 0 -root of the characteristic equation of multiplicity r, That

.

2).
.

A). If the number α is not a root of the characteristic equation (13), then

.

3) where
- degree polynomials m And n accordingly (one of the polynomials may be identically equal to zero);

a) if
is not a root of equation (13), then

Where
- degree polynomials
.

b) if
is the root of the characteristic equation of multiplicity r, That

4) where
- functions of the type considered 1), 2), 3). If
are particular solutions that correspond to the functions
, That

Problem 12. find a general solution to the differential equation.

Solution. This is a 3rd order inhomogeneous differential equation that does not contain the desired function y. This equation can be solved in at least two more ways: the method of variation of arbitrary constants and the method of indefinite coefficients to determine a particular solution to an inhomogeneous linear equation with constant coefficients.

Let's consider the second method.

Let us compose the corresponding homogeneous equation

.

Characteristic equation
has roots:
(case Ia). Partial solutions of a homogeneous equation:

Accordingly, generally homogeneous
.

Now consider the right side of the original equation:
- polynomial of the second degree (case II1). Based on its form, we will compose a particular solution to the inhomogeneous equation:
.

Factor x appears based on the fact that x=0 is the root of the characteristic equation. Finding
and substituting what we found into the original equation, we get

Comparing the coefficients at the same degrees, we obtain the system

,

from which A=1/3, B=1, C=1/2 . Substituting these values ​​into the general form of the particular solution, we obtain

.

Considering that the general solution of an inhomogeneous equation is the sum of a general homogeneous and a particular inhomogeneous one, we have

.

Problem 13. find a general solution to the differential equation.

Solution. Let us find the general solution of the corresponding homogeneous equation. Characteristic equation
has roots: (case Ia). That's why
.

Based on the form of the right-hand side, we will formulate a general form of a particular solution to the inhomogeneous equation, taking into account that =2 is the root of the characteristic equation (case II2b):
.

Differentiating the last 3 times and substituting into the original equation, we find that A=1, B=0 . Then a particular solution to the original equation will be the function
.

Therefore, the general solution to the original differential equation

Problem 14. find a general solution to the differential equation.

Solution. Let us find the general solution of the corresponding homogeneous equation:

.

Characteristic equation
has a double root k=2 (Iв). That's why
.

Based on the form of the right-hand side, it is easy to formulate in general form a particular solution to the original equation: , because 2-6 i is not a root of the characteristic equation (II3a). For this function they are looking for y / And y // and substitute it into the equation given to us. Thus, it is determined that B=0 And A=-1/36 .

Then,
is a particular solution to our inhomogeneous equation, and the desired solution has the form:

.

Problem 15. Find a general solution to the differential equation.

Solution. Because roots of the characteristic equation, then is the general solution of the homogeneous equation. We will look for a particular solution to the inhomogeneous equation in the form

The function is composed according to the form of the right side, taking into account the fact that x=0 is the root of the characteristic equation, and 10 i- No.

Substituting this function into the original equation, we find that

Then, the general solution of the differential equation will be a function.

Fundamentals of solving linear inhomogeneous second order differential equations (LNDE-2) with constant coefficients (PC)

A 2nd order LDDE with constant coefficients $p$ and $q$ has the form $y""+p\cdot y"+q\cdot y=f\left(x\right)$, where $f\left(x \right)$ is a continuous function.

Regarding LNDU 2 with PC, the following two statements are true.

Let us assume that some function $U$ is an arbitrary partial solution of an inhomogeneous differential equation. Let us also assume that some function $Y$ is the general solution (GS) of the corresponding linear homogeneous differential equation (LODE) $y""+p\cdot y"+q\cdot y=0$. Then the GS of LHDE-2 is equal to the sum of the indicated private and general solutions, that is, $y=U+Y$.

If the right-hand side of a 2nd order LMDE is a sum of functions, that is, $f\left(x\right)=f_(1) \left(x\right)+f_(2) \left(x\right)+. ..+f_(r) \left(x\right)$, then first we can find the PDs $U_(1) ,U_(2) ,...,U_(r)$ that correspond to each of the functions $f_( 1) \left(x\right),f_(2) \left(x\right),...,f_(r) \left(x\right)$, and after that write the CR LNDU-2 in the form $U=U_(1) +U_(2) +...+U_(r) $.

Solution of 2nd order LPDE with PC

It is obvious that the type of one or another PD $U$ of a given LNDU-2 depends on the specific form of its right-hand side $f\left(x\right)$. The simplest cases of searching for PD LNDU-2 are formulated in the form of the following four rules.

Rule #1.

The right side of LNDU-2 has the form $f\left(x\right)=P_(n) \left(x\right)$, where $P_(n) \left(x\right)=a_(0) \cdot x^(n) +a_(1) \cdot x^(n-1) +...+a_(n-1) \cdot x+a_(n) $, that is, it is called a polynomial of degree $n$. Then its PD $U$ is sought in the form $U=Q_(n) \left(x\right)\cdot x^(r) $, where $Q_(n) \left(x\right)$ is another polynomial of that the same degree as $P_(n) \left(x\right)$, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2 that are equal to zero. The coefficients of the polynomial $Q_(n) \left(x\right)$ are found by the method of indefinite coefficients (UK).

Rule No. 2.

The right side of LNDU-2 has the form $f\left(x\right)=e^(\alpha \cdot x) \cdot P_(n) \left(x\right)$, where $P_(n) \left( x\right)$ is a polynomial of degree $n$. Then its PD $U$ is sought in the form $U=Q_(n) \left(x\right)\cdot x^(r) \cdot e^(\alpha \cdot x) $, where $Q_(n) \ left(x\right)$ is another polynomial of the same degree as $P_(n) \left(x\right)$, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2 equal to $\alpha $. The coefficients of the polynomial $Q_(n) \left(x\right)$ are found by the NC method.

Rule No. 3.

The right side of LNDU-2 has the form $f\left(x\right)=a\cdot \cos \left(\beta \cdot x\right)+b\cdot \sin \left(\beta \cdot x\right) $, where $a$, $b$ and $\beta$ are known numbers. Then its PD $U$ is sought in the form $U=\left(A\cdot \cos \left(\beta \cdot x\right)+B\cdot \sin \left(\beta \cdot x\right)\right )\cdot x^(r) $, where $A$ and $B$ are unknown coefficients, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2, equal to $i\cdot \beta $. The coefficients $A$ and $B$ are found using the non-destructive method.

Rule No. 4.

The right side of LNDU-2 has the form $f\left(x\right)=e^(\alpha \cdot x) \cdot \left$, where $P_(n) \left(x\right)$ is a polynomial of degree $ n$, and $P_(m) \left(x\right)$ is a polynomial of degree $m$. Then its PD $U$ is sought in the form $U=e^(\alpha \cdot x) \cdot \left\cdot x^(r) $, where $Q_(s) \left(x\right)$ and $ R_(s) \left(x\right)$ are polynomials of degree $s$, the number $s$ is the maximum of two numbers $n$ and $m$, and $r$ is the number of roots of the characteristic equation of the corresponding LODE-2, equal to $\alpha +i\cdot \beta $. The coefficients of the polynomials $Q_(s) \left(x\right)$ and $R_(s) \left(x\right)$ are found by the NC method.

The NK method consists of applying the following rule. In order to find the unknown coefficients of the polynomial that are part of the partial solution of the inhomogeneous differential equation LNDU-2, it is necessary:

  • substitute the PD $U$, written in general form, into the left side of LNDU-2;
  • on the left side of LNDU-2, perform simplifications and group terms with the same powers $x$;
  • in the resulting identity, equate the coefficients of terms with the same powers $x$ of the left and right sides;
  • solve the resulting system of linear equations for unknown coefficients.

Example 1

Task: find OR LNDU-2 $y""-3\cdot y"-18\cdot y=\left(36\cdot x+12\right)\cdot e^(3\cdot x) $. Find also PD , satisfying the initial conditions $y=6$ for $x=0$ and $y"=1$ for $x=0$.

We write down the corresponding LOD-2: $y""-3\cdot y"-18\cdot y=0$.

Characteristic equation: $k^(2) -3\cdot k-18=0$. Roots of the characteristic equation: $k_(1) =-3$, $k_(2) =6$. These roots are valid and distinct. Thus, the OR of the corresponding LODE-2 has the form: $Y=C_(1) \cdot e^(-3\cdot x) +C_(2) \cdot e^(6\cdot x) $.

The right side of this LNDU-2 has the form $\left(36\cdot x+12\right)\cdot e^(3\cdot x) $. It is necessary to consider the coefficient of the exponent $\alpha =3$. This coefficient does not coincide with any of the roots of the characteristic equation. Therefore, the PD of this LNDU-2 has the form $U=\left(A\cdot x+B\right)\cdot e^(3\cdot x) $.

We will search for the coefficients $A$, $B$ using the NC method.

We find the first derivative of the Czech Republic:

$U"=\left(A\cdot x+B\right)^((") ) \cdot e^(3\cdot x) +\left(A\cdot x+B\right)\cdot \left( e^(3\cdot x) \right)^((") ) =$

$=A\cdot e^(3\cdot x) +\left(A\cdot x+B\right)\cdot 3\cdot e^(3\cdot x) =\left(A+3\cdot A\ cdot x+3\cdot B\right)\cdot e^(3\cdot x) .$

We find the second derivative of the Czech Republic:

$U""=\left(A+3\cdot A\cdot x+3\cdot B\right)^((") ) \cdot e^(3\cdot x) +\left(A+3\cdot A\cdot x+3\cdot B\right)\cdot \left(e^(3\cdot x) \right)^((") ) =$

$=3\cdot A\cdot e^(3\cdot x) +\left(A+3\cdot A\cdot x+3\cdot B\right)\cdot 3\cdot e^(3\cdot x) =\left(6\cdot A+9\cdot A\cdot x+9\cdot B\right)\cdot e^(3\cdot x) .$

We substitute the functions $U""$, $U"$ and $U$ instead of $y""$, $y"$ and $y$ into the given NLDE-2 $y""-3\cdot y"-18\cdot y=\left(36\cdot x+12\right)\cdot e^(3\cdot x). $ Moreover, since the exponent $e^(3\cdot x) $ is included as a factor in all components, then its can be omitted. We get:

$6\cdot A+9\cdot A\cdot x+9\cdot B-3\cdot \left(A+3\cdot A\cdot x+3\cdot B\right)-18\cdot \left(A\ cdot x+B\right)=36\cdot x+12.$

We perform the actions on the left side of the resulting equality:

$-18\cdot A\cdot x+3\cdot A-18\cdot B=36\cdot x+12.$

We use the NDT method. We obtain a system of linear equations with two unknowns:

$-18\cdot A=36;$

$3\cdot A-18\cdot B=12.$

The solution to this system is: $A=-2$, $B=-1$.

PD $U=\left(A\cdot x+B\right)\cdot e^(3\cdot x) $ for our problem looks like this: $U=\left(-2\cdot x-1\right) \cdot e^(3\cdot x) $.

The OR $y=Y+U$ for our problem looks like this: $y=C_(1) \cdot e^(-3\cdot x) +C_(2) \cdot e^(6\cdot x) +\ left(-2\cdot x-1\right)\cdot e^(3\cdot x) $.

In order to search for a PD that satisfies the given initial conditions, we find the derivative $y"$ of the OP:

$y"=-3\cdot C_(1) \cdot e^(-3\cdot x) +6\cdot C_(2) \cdot e^(6\cdot x) -2\cdot e^(3\ cdot x) +\left(-2\cdot x-1\right)\cdot 3\cdot e^(3\cdot x) .$

We substitute into $y$ and $y"$ the initial conditions $y=6$ for $x=0$ and $y"=1$ for $x=0$:

$6=C_(1) +C_(2) -1; $

$1=-3\cdot C_(1) +6\cdot C_(2) -2-3=-3\cdot C_(1) +6\cdot C_(2) -5.$

We received a system of equations:

$C_(1) +C_(2) =7;$

$-3\cdot C_(1) +6\cdot C_(2) =6.$

Let's solve it. We find $C_(1) $ using Cramer's formula, and $C_(2) $ we determine from the first equation:

$C_(1) =\frac(\left|\begin(array)(cc) (7) & (1) \\ (6) & (6) \end(array)\right|)(\left|\ begin(array)(cc) (1) & (1) \\ (-3) & (6) \end(array)\right|) =\frac(7\cdot 6-6\cdot 1)(1\ cdot 6-\left(-3\right)\cdot 1) =\frac(36)(9) =4; C_(2) =7-C_(1) =7-4=3.$

Thus, the PD of this differential equation has the form: $y=4\cdot e^(-3\cdot x) +3\cdot e^(6\cdot x) +\left(-2\cdot x-1\right )\cdot e^(3\cdot x) $.