Examples of solutions lndu. Solving first order linear differential equations

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 of 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);

and 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.

First order linear differential equation is an equation of the form

,
where p and q are functions of the variable x.

Linear homogeneous differential equation of the first order is an equation of the form

Linear inhomogeneous differential equation of the first order is an equation of the form

q term (x) is called the inhomogeneous part of the equation.

Consider a linear inhomogeneous differential equation of the first order:
(1) .
There are three ways to solve this equation:

  • integrating factor method;

Solving a linear differential equation using an integrating factor

Let's consider a method for solving a first-order linear differential equation using integrating factor.
Let's multiply both sides of the original equation (1) by integrating factor
:
(2)
Next, we note that the derivative of the integral is equal to the integrand:

According to the rule of differentiation of a complex function:

According to the product differentiation rule:


Substitute in (2) :

Let's integrate:

Multiply by . We get:

general solution to a first order linear differential equation

An example of solving a first order linear differential equation

Solve the equation

Solution
Let's divide both sides of the original equation by x: .
(i)
;
.
Then

Integrating factor: The modulus sign can be omitted, since the integrating factor can be multiplied by any constant (including).
± 1 Let's divide both sides of the original equation by x: Let's multiply 3 :
.
by x
;
.
We select the derivative.
.
We integrate using the table of integrals: 3 :
.

Divide by x

Answer
References:

N.M. Gunther, R.O. Kuzmin, Collection of problems in higher mathematics, “Lan”, 2003.

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.

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 (HLDE) $y""+p\cdot y"+q\cdot y=0$. Then the GR 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$. The roots of the characteristic equation are: $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 of the 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 linear homogeneous second-order 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 a 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.

N.M. Gunther, R.O. Kuzmin, Collection of problems in higher mathematics, “Lan”, 2003.

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.

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 (HLDE) $y""+p\cdot y"+q\cdot y=0$. Then the GR 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$. The roots of the characteristic equation are: $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) $.