In this section we consider the constant coefficient equation
where \(\lambda\) and \(\omega\) are real numbers, \(\omega\ne0\), and \(P\) and \(Q\) are polynomials. We want to find a particular solution of (5.5.1). As in Section 5.4, the procedure that we will use is called the method of undetermined coefficients.
Forcing Functions Without Exponential Factors
We begin with the case where \(\lambda=0\) in (5.5.1); thus, we we want to find a particular solution of
where \(P\) and \(Q\) are polynomials.
Differentiating \(x^r\cos\omega x\) and \(x^r\sin\omega x\) yields
This implies that if
where \(A\) and \(B\) are polynomials, then
where \(F\) and \(G\) are polynomials with coefficients that can be expressed in terms of the coefficients of \(A\) and \(B\). This suggests that we try to choose \(A\) and \(B\) so that \(F=P\) and \(G=Q\), respectively. Then \(y_p\) will be a particular solution of (5.5.2). The next theorem tells us how to choose the proper form for \(y_p\). For the proof see Exercise 37.
Theorem 5.5.1
Suppose \(\omega\) is a positive number and \(P\) and \(Q\) are polynomials\(.\) Let \(k\) be the larger of the degrees of \(P\) and \(Q.\) Then the equation
has a particular solution
where
provided that \(\cos\omega x\) and \(\sin\omega x\) are not solutions of the complementary equation\(.\) The solutions of
\((\)for which \(\cos\omega x\) and \(\sin\omega x\) are solutions of the complementary equation\()\) are of the form \(\eqref{eq:5.5.3},\) where
For an analog of this theorem that’s applicable to (5.5.1), see Exercise 38.
Example 5.5.1
Find a particular solution of
Solution In (5.5.4) the coefficients of \(\cos2x\) and \(\sin2x\) are both zero degree polynomials (constants). Therefore Theorem 5.5.1 implies that (5.5.4) has a particular solution
Since
replacing \(y\) by \(y_p\) in (5.5.4) yields
Equating the coefficients of \(\cos2x\) and \(\sin2x\) here with the corresponding coefficients on the right side of (5.5.4) shows that \(y_p\) is a solution of (5.5.4) if
Solving these equations yields \(A=1\), \(B=-2\). Therefore
is a particular solution of (5.5.4).
Example 5.5.2
Find a particular solution of
Solution The procedure used in Example 5.5.1 doesn’t work here; substituting \(y_p=A\cos2x+B\sin2x\) for \(y\) in (5.5.5) yields
for any choice of \(A\) and \(B\), since \(\cos2x\) and \(\sin2x\) are both solutions of the complementary equation for (5.5.5). We’re dealing with the second case mentioned in Theorem 5.5.1, and should therefore try a particular solution of the form
Then
so
Therefore \(y_p\) is a solution of (5.5.5) if
which holds if \(A=-3\) and \(B=2\). Therefore
is a particular solution of (5.5.5).
Example 5.5.3
Find a particular solution of
Solution The coefficients of \(\cos x\) and \(\sin x\) in (5.5.7) are polynomials of degree one and zero, respectively. Therefore Theorem 5.5.1 tells us to look for a particular solution of (5.5.7) of the form
Then
and
so
Comparing the coefficients of \(x\cos x\), \(x\sin x\), \(\cos x\), and \(\sin x\) here with the corresponding coefficients in (5.5.7) shows that \(y_p\) is a solution of (5.5.7) if
Solving the first two equations yields \(A_1=2\), \(B_1=6\). Substituting these into the last two equations yields
Solving these equations yields \(A_0=1\), \(B_0=-1\). Substituting \(A_0=1\), \(A_1=2\), \(B_0=-1\), \(B_1=6\) into (5.5.8) shows that
is a particular solution of (5.5.7).
A Useful Observation
In (5.5.9), (5.5.10), and (5.5.11) the polynomials multiplying \(\sin x\) can be obtained by replacing \(A_0,A_1,B_0\), and \(B_1\) by \(B_0\), \(B_1\), \(-A_0\), and \(-A_1\), respectively, in the polynomials mutiplying \(\cos x\). An analogous result applies in general, as follows (Exercise 36).
Theorem 5.5.2
If
where \(A(x)\) and \(B(x)\) are polynomials with coefficients \(A_0\) …, \(A_k\) and \(B_0\), …, \(B_k,\) then the polynomials multiplying \(\sin\omega x\) in
can be obtained by replacing \(A_0\), …\(,\) \(A_k\) by \(B_0,\) …\(,\) \(B_k\) and \(B_0,\) …\(,\) \(B_k\) by \(-A_0,\) …\(,\) \(-A_k\) in the corresponding polynomials multiplying \(\cos\omega x\).
We won’t use this theorem in our examples, but we recommend that you use it to check your manipulations when you work the exercises.
Example 5.5.4
Find a particular solution of
Solution According to Theorem 5.5.1, we should look for a particular solution of the form
since \(\cos x\) and \(\sin x\) are solutions of the complementary equation. However, let’s try
first, so you can see why it doesn’t work. From (5.5.10),
which together with (5.5.14) implies that
Since the right side of this equation does not contain \(x\cos x\) or \(x\sin x\), (5.5.14) can’t satisfy (5.5.12) no matter how we choose \(A_0\), \(A_1\), \(B_0\), and \(B_1\).
Now let \(y_p\) be as in (5.5.13). Then
so
Comparing the coefficients of \(\cos x\) and \(\sin x\) here with the corresponding coefficients in (5.5.12) shows that \(y_p\) is a solution of (5.5.12) if
The solution of this system is \(A_1=2\), \(B_1=-1\), \(A_0=3\), \(B_0=2\). Therefore
is a particular solution of (5.5.12).
Forcing Functions with Exponential Factors
To find a particular solution of
when \(\lambda\ne0\), we recall from Section 5.4 that substituting \(y=ue^{\lambda x}\) into (5.5.15) will produce a constant coefficient equation for \(u\) with the forcing function \(P(x)\cos \omega x+Q(x)\sin \omega x\). We can find a particular solution \(u_p\) of this equation by the procedure that we used in Examples 5.5.1–5.5.4. Then \(y_p=u_pe^{\lambda x}\) is a particular solution of (5.5.15).
Example 5.5.5
Find a particular solution of
Solution Let \(y=ue^{-2x}\). Then
if
Since \(\cos3x\) and \(\sin3x\) aren’t solutions of the complementary equation
Theorem 5.5.1 tells us to look for a particular solution of (5.5.17) of the form
Then
so
Comparing the coefficients of \(x\cos 3x\), \(x\sin 3x\), \(\cos 3x\), and \(\sin 3x\) here with the corresponding coefficients on the right side of (5.5.17) shows that \(u_p\) is a solution of (5.5.17) if
Solving the first two equations yields \(A_1=7\), \(B_1=1\). Substituting these values into the last two equations of (5.5.19) yields
Solving this system yields \(A_0=1\), \(B_0=-2\). Substituting \(A_0=1\), \(A_1=7\), \(B_0=-2\), and \(B_1=1\) into (5.5.18) shows that
is a particular solution of (5.5.17). Therefore
is a particular solution of (5.5.16).
Example 5.5.6
Find a particular solution of
Solution Let \(y=ue^{-x}\). Then
if
Since \(\cos2x\) and \(\sin2x\) are solutions of the complementary equation
Theorem 5.5.1 tells us to look for a particular solution of (5.5.21) of the form
Then
so
Equating the coefficients of \(x\cos2x\), \(x\sin2x\), \(\cos2x\), and \(\sin2x\) here with the corresponding coefficients on the right side of (5.5.21) shows that \(u_p\) is a solution of (5.5.21) if
The solution of this system is \(A_1=1\), \(B_1=-2\), \(B_0=1\), \(A_0=1\). Therefore
is a particular solution of (5.5.21), and
is a particular solution of (5.5.20). ∎
You can also find a particular solution of (5.5.20) by substituting
for \(y\) in (5.5.20) and equating the coefficients of \(xe^{-x}\cos2x\), \(xe^{-x}\sin2x\), \(e^{-x}\cos2x\), and \(e^{-x}\sin2x\) in the resulting expression for
with the corresponding coefficients on the right side of (5.5.20). (See Exercise 38). This leads to the same system (5.5.22) of equations for \(A_0\), \(A_1\), \(B_0\), and \(B_1\) that we obtained in Example 5.5.6. However, if you try this approach you’ll see that deriving (5.5.22) this way is much more tedious than the way we did it in Example 5.5.6.
5.5 Exercises
In Exercises 1–17 find a particular solution.
-
\(y''+3y'+2y=7\cos x-\sin x\)
Show answer
\(y_p=\cos x+2\sin x\)
-
\(y''+3y'+y=(2-6x)\cos x-9\sin x\)
Show answer
\(y_p=\cos x+(2-2x)\sin x\)
-
\(y''+2y'+y=e^x(6\cos x+17\sin x)\)
Show answer
\(y_p=e^x(-2\cos x+3\sin x)\)
-
\(y''+3y'-2y=-e^{2x}(5\cos2x+9\sin2x)\)
Show answer
\(y_p=\dst{{e^{2x}\over2}(\cos2x-\sin2x)}\)
-
\(y''-y'+y=e^x(2+x)\sin x\)
Show answer
\(y_p=-e^x(x\cos x-\sin x)\)
-
\(y''+3y'-2y=e^{-2x}\left[(4+20x)\cos 3x+(26-32x)\sin 3x\right]\)
Show answer
\(y_p=e^{-2x}(1-2x)(\cos 3x-\sin 3x)\)
-
\(y''+4y=-12\cos2x-4\sin2x\)
Show answer
\(y_p=x(\cos2x-3\sin2x)\)
-
\(y''+y=(-4+8x)\cos x+(8-4x)\sin x\)
Show answer
\(y_p=-x\left[(2-x)\cos x+(3-2x)\sin x\right]\)
-
\(4y''+y=-4\cos x/2-8x\sin x/2\)
Show answer
\(y_p=x\dst{\left[x\cos\left(x\over2\right) -3\sin\left(x\over2\right)\right]}\)
-
\(y''+2y'+2y=e^{-x}(8\cos x-6\sin x)\)
Show answer
\(y_p=xe^{-x}(3\cos x+4\sin x)\)
-
\(y''-2y'+5y=e^x\left[(6+8x)\cos 2x+(6-8x)\sin2x\right]\)
Show answer
\(y_p=xe^x\left[(-1+x)\cos2x+(1+x)\sin 2x\right]\)
-
\(y''+2y'+y=8x^2\cos x-4x\sin x\)
Show answer
\(y_p=-(14-10x)\cos x-(2+8x-4x^2)\sin x\).
-
\(y''+3y'+2y=(12+20x+10x^2)\cos x+8x\sin x\)
Show answer
\(y_p=(1+2x+x^2)\cos x+(1+3x^2)\sin x\)
-
\(y''+3y'+2y=(1-x-4x^2)\cos2x-(1+7x+2x^2)\sin2x\)
Show answer
\(y_p=\dst{x^2\over2}(\cos2x-\sin2x)\)
-
\(y''-5y'+6y=-e^x\left[(4+6x-x^2)\cos x-(2-4x+3x^2)\sin x\right]\)
Show answer
\(y_p=e^x(x^2\cos x+2\sin x)\)
-
\(y''-2y'+y=-e^x\left[(3+4x-x^2)\cos x+(3-4x-x^2)\sin x\right]\)
Show answer
\(y_p=e^x(1-x^2)(\cos x+\sin x)\)
-
\(y''-2y'+2y=e^x\left[(2-2x-6x^2)\cos x+(2-10x+6x^2)\sin x\right]\)
Show answer
\(y_p=e^x(x^2-x^3)(\cos x+\sin x)\)
-
C/G \(y''+2y'+y=e^{-x}\left[(5-2x)\cos x-(3+3x)\sin x\right]\)
Show answer
\(y_p=e^{-x}\left[(1+2x)\cos x-(1-3x)\sin x\right]\)
-
C/G \(y''+9y=-6\cos 3x-12\sin 3x\)
Show answer
\(y_p=x(2\cos 3x-\sin 3x)\)
-
C/G \(y''+3y'+2y=(1-x-4x^2)\cos2x-(1+7x+2x^2)\sin2x\)
Show answer
\(y_p=-x^3\cos x+(x+2x^2)\sin x\)
-
C/G \(y''+4y'+3y=e^{-x}\left[(2+x+x^2)\cos x+(5+4x+2x^2)\sin x\right]\)
Show answer
\(y_p=-e^{-x}\left[(x+x^2)\cos x-(1+2x)\sin x\right]\)
-
\(y''-7y'+6y=-e^x(17\cos x-7\sin x), \quad y(0)=4,\; y'(0)=2\)
Show answer
\(y=e^x(2\cos x+3\sin x)+3e^x-e^{6x}\)
-
\(y''-2y'+2y=-e^x(6\cos x+4\sin x), \quad y(0)=1,\; y'(0)=4\)
Show answer
\(y=e^x\left[(1+2x)\cos x+(1-3x)\sin x\right]\)
-
\(y''+6y'+10y=-40e^x\sin x, \quad y(0)=2,\quad y'(0)=-3\)
Show answer
\(y=e^x(\cos x-2\sin x)+e^{-3x}(\cos x+\sin x)\)
-
\(y''-6y'+10y=-e^{3x}(6\cos x+4\sin x), \quad y(0)=2,\quad y'(0)=7\)
Show answer
\(y=e^{3x}\left[(2+2x)\cos x-(1+3x)\sin x\right]\)
-
\(y''-3y'+2y=e^{3x}\left[21\cos x-(11+10x)\sin x\right], \; y(0)=0, \quad y'(0)=6\)
Show answer
\(y=e^{3x}\left[(2+3x)\cos x+(4-x)\sin x\right]+3e^x-5e^{2x}\)
In Exercises 27–32 use the principle of superposition to find a particular solution. Where indicated, solve the initial value problem.
-
\(y''-2y'-3y=4e^{3x}+e^x(\cos x-2\sin x)\)
Show answer
\(y_p=\dst{xe^{3x}-{e^x\over5}(\cos x-2\sin x)}\)
-
\(y''+y=4\cos x-2\sin x+xe^x+e^{-x}\)
Show answer
\(y_p=\dst{x(\cos x+2\sin x)-{e^x\over2}(1-x)+{e^{-x}\over2}}\)
-
\(y''-3y'+2y=xe^x+2e^{2x}+\sin x\)
Show answer
\(y_p=\dst{-{xe^x\over2}(2+x)+2xe^{2x}+{1\over10}(3\cos x+\sin x)}\)
-
\(y''-2y'+2y=4xe^x\cos x+xe^{-x}+1+x^2\)
Show answer
\(y_p=\dst{xe^x(\cos x+x\sin x)+{e^{-x}\over25}(4+5x)+1+x+{x^2\over2}}\)
-
\(y''-4y'+4y=e^{2x}(1+x)+e^{2x}(\cos x-\sin x)+3e^{3x}+1+x\)
Show answer
\(y_p=\dst{{x^2e^{2x}\over6}(3+x)-e^{2x}(\cos x-\sin x)+3e^{3x}+{1\over4}(2+x)}\)
-
\(y''-4y'+4y=6e^{2x}+25\sin x , \quad y(0)=5,\; y'(0)=3\)
Show answer
\(y=(1-2x+3x^2)e^{2x}+4\cos x+3\sin x\)
-
C/G \(y''+4y=-e^{-2x}\left[(4-7x)\cos x+(2-4x)\sin x\right], \; y(0)=3, \quad y'(0)=1\)
Show answer
\(y=xe^{-2x}\cos x+3\cos2x\)
-
C/G \(y''+4y'+4y=2\cos2x+3\sin2x+e^{-x} , \quad y(0)=-1,\; y'(0)=2\)
Show answer
\(y=\dst{-{3\over8}\cos2x+{1\over4}\sin2x+e^{-x}-{13\over8}e^{-2x}- {3\over4}xe^{-2x}}\)
-
C/G \(y''+4y=e^x(11+15x)+8\cos2x-12\sin2x , \quad y(0)=3,\; y'(0)=5\)
-
Verify that if
\[ y_p=A(x)\cos\omega x+B(x)\sin\omega x \]where \(A\) and \(B\) are twice differentiable, then
\begin{eqnarray*} y_p'&=&(A'+\omega B)\cos\omega x+(B'-\omega A) \sin\omega x\mbox{ and} \\ y_p''&=&(A''+2\omega B'-\omega^2A)\cos\omega x +(B''-2\omega A'-\omega^2B)\sin\omega x. \end{eqnarray*}Use the results of (a) to verify that
\begin{eqnarray*} ay_p''+by_p'+cy_p&=&\left[(c-a\omega^2)A+b\omega B+2a\omega B'+bA'+aA''\right] \cos\omega x+ \\[6pt] && \left[-b\omega A+(c-a\omega^2)B-2a\omega A'+bB'+aB''\right]\sin\omega x. \end{eqnarray*}Use the results of (a) to verify that
\[ y_p''+\omega^2 y_p=(A''+2\omega B')\cos\omega x+ (B''-2\omega A')\sin\omega x. \]Prove Theorem 5.5.2.
-
Let \(a\), \(b\), \(c\), and \(\omega\) be constants, with \(a\ne0\) and \(\omega>0\), and let
\[ P(x)=p_0+p_1x+\cdots+p_kx^k \mbox{\quad and \quad} Q(x)=q_0+q_1x+\cdots+q_kx^k, \]where at least one of the coefficients \(p_k\), \(q_k\) is nonzero, so \(k\) is the larger of the degrees of \(P\) and \(Q\).
Show that if \(\cos\omega x\) and \(\sin\omega x\) are not solutions of the complementary equation
\[ ay''+by'+cy=0, \]then there are polynomials
\[ A(x)=A_0+A_1x+\cdots+A_kx^k \mbox{\quad and \quad} B(x)=B_0+B_1x+\cdots+B_kx^k \tag*{\rm (A)} \]such that
\[ \begin{array}{lcl} \quad (c-a\omega^2)A+b\omega B+2a\omega B'+bA'+aA''&=&P\phantom{.}\\[6pt] -b\omega A+(c-a\omega^2)B-2a\omega A'+bB'+aB''&=&Q, \end{array} \]where \((A_k,B_k)\), \((A_{k-1},B_{k-1})\), …,\((A_0,B_0)\) can be computed successively by solving the systems
\[ \begin{array}{lcl} \phantom{-}(c-a\omega^2)A_k+b\omega B_k&=&p_k\phantom{.}\\[6pt] -b\omega A_k+(c-a\omega^2)B_k&=&q_k, \end{array} \]and, if \(1\le r\le k\),
\[ \begin{array}{lcl} \phantom{-}(c-a\omega^2)A_{k-r}+b\omega B_{k-r}&=&p_{k-r}+\cdots\phantom{.}\\[6pt] -b\omega A_{k-r}+(c-a\omega^2)B_{k-r}&=&q_{k-r}+\cdots, \end{array} \]where the terms indicated by “\(\cdots\)” depend upon the previously computed coefficients with subscripts greater than \(k-r\). Conclude from this and Exercise 36(b) that
\[ y_p=A(x)\cos\omega x+B(x)\sin\omega x \tag*{\rm (B)} \]is a particular solution of
\[ ay''+by'+cy=P(x)\cos\omega x+Q(x)\sin\omega x. \]Conclude from Exercise 36(c) that the equation
\[ a(y''+\omega^2 y)=P(x)\cos\omega x+Q(x)\sin\omega x \tag*{\rm (C)} \]does not have a solution of the form (B) with \(A\) and \(B\) as in (A). Then show that there are polynomials
\[ A(x)=A_0x+A_1x^2+\cdots+A_kx^{k+1}\mbox{\quad and \quad} B(x)=B_0x+B_1x^2+\cdots+B_kx^{k+1} \]such that
\[ \begin{array}{rcl} a(A''+2\omega B')&=&P\\[6pt] a(B''-2\omega A')&=&Q, \end{array} \]where the pairs \((A_k,B_k)\), \((A_{k-1},B_{k-1})\), …, \((A_0,B_0)\) can be computed successively as follows:
\begin{eqnarray*} A_k&=&-{q_k\over2a\omega(k+1)} \\[6pt] B_k&=&\phantom{-}{p_k\over2a\omega(k+1)}, \end{eqnarray*}and, if \(k\ge 1\),
\begin{eqnarray*} A_{k-j}&=&-{1\over2\omega} \left[{q_{k-j}\over a(k-j+1)}-(k-j+2)B_{k-j+1}\right] \\[6pt] B_{k-j}&=&\phantom{-}{1\over2\omega} \left[{p_{k-j}\over a(k-j+1)}-(k-j+2)A_{k-j+1}\right] \end{eqnarray*}for \(1\le j\le k\). Conclude that (B) with this choice of the polynomials \(A\) and \(B\) is a particular solution of (C).
-
Show that Theorem 5.5.1 implies the next theorem:
Suppose \(\omega\) is a positive number and \(P\) and \(Q\) are polynomials. Let \(k\) be the larger of the degrees of \(P\) and \(Q\). Then the equation
\[ ay''+by'+cy=e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right) \]has a particular solution
\[ y_p=e^{\lambda x}\left(A(x)\cos\omega x+B(x)\sin\omega x\right), \tag*{\rm (A)} \]where
\[ A(x)=A_0+A_1x+\cdots+A_kx^k \mbox{\quad and \quad} B(x)=B_0+B_1x+\cdots+B_kx^k, \]provided that \(e^{\lambda x}\cos\omega x\) and \(e^{\lambda x}\sin\omega x\) are not solutions of the complementary equation. The equation
\[ a\left[y''-2\lambda y'+(\lambda^2+\omega^2)y\right]= e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right) \]\((\)for which \(e^{\lambda x}\cos\omega x\) and \(e^{\lambda x}\sin\omega x\) are solutions of the complementary equation\()\) has a particular solution of the form (A), where
\[ A(x)=A_0x+A_1x^2+\cdots+A_kx^{k+1} \mbox{\quad and \quad} B(x)=B_0x+B_1x^2+\cdots+B_kx^{k+1}. \] -
This exercise presents a method for evaluating the integral
\[ y=\int e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)\,dx \]where \(\omega\ne0\) and
\[ P(x)=p_0+p_1x+\cdots+p_kx^k,\quad Q(x)=q_0+q_1x+\cdots+q_kx^k. \]Show that \(y=e^{\lambda x}u\), where
\[ u'+\lambda u=P(x)\cos \omega x+Q(x)\sin \omega x. \tag*{\rm (A)} \]Show that (A) has a particular solution of the form
\[ u_p=A(x)\cos \omega x+B(x)\sin \omega x, \]where
\[ A(x)=A_0+A_1x+\cdots+A_kx^k,\quad B(x)=B_0+B_1x+\cdots+B_kx^k, \]and the pairs of coefficients \((A_k,B_k)\), \((A_{k-1},B_{k-1})\), …,\((A_0,B_0)\) can be computed successively as the solutions of pairs of equations obtained by equating the coefficients of \(x^r\cos\omega x\) and \(x^r\sin\omega x\) for \(r=k\), \(k-1\), …, \(0\).
Conclude that
\[ \int e^{\lambda x}\left(P(x)\cos \omega x+Q(x)\sin \omega x\right)\,dx = e^{\lambda x}\left(A(x)\cos \omega x+B(x)\sin \omega x\right) +c, \]where \(c\) is a constant of integration.
-
Use the method of Exercise 39 to evaluate the integral.
(a) \(\int x^2\cos x\,dx\) (b) \(\int x^2e^x\cos x\,dx\) (c) \(\int xe^{-x}\sin2x\,dx\) (d) \(\int x^2e^{-x}\sin x\,dx\) (e) \(\int x^3e^x\sin x\,dx\) (f) \(\int e^x\left[x\cos x-(1+3x)\sin x\right]\,dx\) (g) \(\int e^{-x}\left[(1+x^2)\cos x+(1-x^2)\sin x\right]\,dx\)
Show answer
(a) \(2x\cos x-(2-x^2)\sin x+c\) (b) \(-\dst{e^x\over2}\left[(1-x^2)\cos x-(1-x)^2\sin x \right]+c\)
(c) \(-\dst{e^{-x}\over25}\left[(4+10x)\cos 2x-(3-5x)\sin2x\right]+c\)
(d) \(-\dst{e^{-x}\over2}\left[(1+x)^2\cos x-(1-x^2)\sin x \right]+c\)
(e) \(-\dst{e^x\over2}\left[x(3-3x+x^2)\cos x-(3-3x+x^3)\sin x\right]+c\)
(f) \(-e^x\left[(1-2x)\cos x+(1+x)\sin x\right]+c\) (g) \(e^{-x}\left[x\cos x+x(1+x)\sin x\right]+c\)