# how to make the last line in this table

please how to make the last row in the table ? I try but it the second column did not be centered

this is my try

\begin{tabular}{ |c|c| }

\hline

R(x) & Form of $y_p$  \\

\hline  \hline

$Cx^n$ &$A_0x^n + A_1x^{n-1} + \ldots + A_{n-1}x + A_n$  \\

\hline

$Ce^{rx}$ & $Ae^{rx}$  \\

\hline

$Ce^{rx} cos(kx)$\\  $Ce^{rx} sin(kx)$ &$Ae^{rx} cos(kx) + Be^{rx} sin(kx)$\\

\hline

\end{tabular}


• It would be great if you could show us what you have tried. Posting a minimal working example that indicates what you are trying to do makes it easier for people to understand what you want. It also makes it easier for people to help you, since they have some code to start from, and hence much more likely that some one will try to help you. – Andrew Jul 13 '17 at 9:12
• Unfortunately you've added only a code snippet. This is better than nothing, but still not a minimal working example. Please have a look at the link in Andrew's comment. – Schweinebacke Jul 13 '17 at 9:28

You can use, e.g., an array in an array:
\documentclass{article}
$\begin{array}{|c|c|} \hline R(x) & \text{Form of }y_p \\ \hline\hline Cx^n & A_0x^n+A_yx^{n-1}+\cdots+A_{n-1}x+A_n \\ \hline Ce^{rx} & Ae^{rx} \\ \hline \begin{array}[c]{@{}c@{}} Ce^{rx}\cos(kx) \\ Ce^{rx}\sin(kx) \\ \end{array} & Ae^{rx}\cos(kx)+Be^{rx}\sin(kx) \\ \hline \end{array}$