Re: Tabella (complessa) in LaTeX

#89468
GuITstaff
Amministratore del forum
    Up
    0
    Down
    ::


    Signori, ormai ci siamo. Meglio, il codice che ho scritto (causa le mie grandi carenze in materia) è orribile, ma la resa grafica mi piace.

    Dunque, il codice è il seguente:
    `\documentclass[a4paper, twoside, 10pt]{report}
    \usepackage[top=0.5cm, bottom=0cm, left=0cm, right=0cm, landscape]{geometry}

    \usepackage[italian]{babel}
    \usepackage[utf8]{inputenc}

    \usepackage{amsmath,amsfonts,textcomp,multirow}
    \usepackage[dvipsnames]{xcolor}

    \usepackage{draftwatermark}
    \SetWatermarkText{TeM}
    \SetWatermarkScale{10}
    \SetWatermarkColor[gray]{0.95}

    \begin{document}

    \begin{center}

    \bigskip
    \textbf{\large EQUAZIONI DIFFERENZIALI ORDINARIE}
    \bigskip

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

    \cline{1-6}

    \multirow{2}{*}{\parbox{2.40cm}{ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.}
    \center \bf 1\textdegree ordine}} &

    {\parbox{5.00cm}{\center SEPARAZIONE DELLE VARIABILI}} &

    \multicolumn{4}{c|}{\parbox{15.50cm}{\center \( P.C. \; \begin{cases} y'(x)=f(x)g(y) \\ y(x_0)=y_0 \end{cases} \Rightarrow \; \frac{dy}{dx}=f(x)g(y) \; \; \; \;
    \begin{aligned} & Se \; esiste \; \bar{y} \; : \; g(y)=0 \; e \; se \; \bar{y}=y_0 \\ & allora \; una \; soluzione \; del \; P.C. \; \grave{e} \; \bar{y}=y_0\,. \\ &
    Altrimenti, \; se \; g(y)\ne 0 \; : \; \int \frac{dy}{g(y)} = \int f(x)\,dx + C \\ & e \; il \; P.C. \; deve \; essere \; soddisfatto. \end{aligned} \) \\ \textcolor{white}{.} }} \\

    \cline{2-6} &

    {\parbox{5.00cm}{\center LINEARE NON OMOGENEA}} &

    \multicolumn{4}{c|}{\parbox{15.50cm}{\center \( P.C. \; \begin{cases} y'(x) + p(x)y(x) = q(x) \\ y(x_0) = y_0 \end{cases} \; \; \; \; \; \; \; \; \; \; \; \; \; \Rightarrow
    \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \begin{aligned} & y(x)=y_0\,e^{-P(x)}+e^{-P(x)}\int_{x_0}^x q(s)\,e^{P(s)}\,ds \\ & dove : \; P(x) := \int_{x_0}^x p(t)\,dt \; .
    \end{aligned} \) \flushleft \textcolor{white}{.} \underline{Nota}: se \(p(x)=q(x) \, \Rightarrow \, \) SEPARAZIONE DELLE VARIABILI \\ \textcolor{white}{.} }} \\

    \hline

    \multirow{11}{*}{\parbox{2.40cm}{ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\
    \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.}
    \center \bf 2\textdegree ordine \\ (a coefficienti costanti)}} &

    \multirow{3}{*}{\parbox{5.00cm}{ \textcolor{white}{.} \\ \textcolor{white}{.} \center OMOGENEA \\ \textcolor{white}{.} \\ \(y''(x)+a\,y'(x)+b\,y(x)=0\)}} &

    \multirow{3}{*}{\parbox{4.00cm}{ \textcolor{white}{.} \center Prima risolvere \\ l'equazione \\ caratteristica
    \[\begin{aligned} p(k) & := k^2+ak+b=0\\ & \left( \Delta :=a^2-4b \right) \end{aligned}\] }} &

    {\parbox{2.00cm}{\center \(\Delta > 0\) }} &

    {\parbox{3.50cm}{\center \( k_1 \, \land \, k_2 \) \\ sono le soluzioni \\ \textcolor{white}{.} }} &

    {\parbox{7.00cm}{\center \( y_{omo}(x)=c_1\,e^{k_1\,x}+c_2\,e^{k_2\,x} \) }} \\

    \cline{4-6} & & &

    {\parbox{2.00cm}{\center \(\Delta = 0\) }} &

    {\parbox{3.50cm}{\center \( k = -\frac{a}{2} \) \\ è la soluzione \\ \textcolor{white}{.} }} &

    {\parbox{7.00cm}{\center \( y_{omo}(x)=e^{k\,x}\left(c_1+c_2\,x\right) \) }} \\

    \cline{4-6} & & &

    {\parbox{2.00cm}{\center \(\Delta < 0\) }} & {\parbox{3.50cm}{\center \( \left(\alpha-i\,\beta\right) \, \land \, \left(\alpha+i\,\beta\right) \) \\ sono le soluzioni \\ \textcolor{white}{.} }} & {\parbox{7.00cm}{\center \( y_{omo}(x)=e^{\alpha\,x}\left(c_1\,\cos\left(\beta\,x\right)+c_2\,\sin\left(\beta\,x\right)\right) \) }} \\ \cline{2-6} & \multirow{8}{*}{\parbox{5.00cm}{ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \center COMPLETA \\ \textcolor{white}{.} \\ \(y''(x) + a\,y'(x)+b\,y(x)=q(x)\) \\ \textcolor{white}{.} \\ \underline{Nota}: Prima risolvere \\ l'equazione omogenea \\ associata \(y_{omo}(x)\) \\ e poi cercare l'equazione \\ particolare \(y_p(x)\). \\ \textcolor{white}{.} \\ La soluzione finale è data da \\ \(y(x)=y_{omo}(x)+y_p(x)\) }} & \multirow{3}{*}{\parbox{5.00cm}{ \textcolor{white}{.} \\ \center\(q(x)\) è un \\ polinomio di \\ grado \(n\)}} & {\parbox{2.10cm}{\center\(b \ne 0\)} } & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) \) è un polinomio di grado \(n\) \\ \textcolor{white}{.} }} \\ \cline{4-6} & & & {\parbox{2.10cm}{\center\( b = 0 \; \land \; a \ne 0\) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) \) è un polinomio di grado \(n+1\) \\ \textcolor{white}{.} }} \\ \cline{4-6} & & & {\parbox{2.10cm}{\center\( b = 0 \; \land \; a = 0\) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) \) è un polinomio di grado \(n+2\) \\ \textcolor{white}{.} }} \\ \cline{3-6} & & \multirow{3}{*}{\parbox{5.00cm}{ \textcolor{white}{.} \\ \textcolor{white}{.} \\ \textcolor{white}{.} \center \(q(x)=A\,e^{\alpha\,x}\)}} & {\parbox{2.10cm}{\center\( p(\alpha) \ne 0 \) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) = B\,e^{\alpha\,x} \)\\ \textcolor{white}{.} }} \\ \cline{4-6} & & & {\parbox{2.10cm}{\center\( (k-\alpha)^1 \, | \, p(k) \) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) = B\,x\,e^{\alpha\,x} \) \\ \textcolor{white}{.} }} \\ \cline{4-6} & & & {\parbox{2.10cm}{\center\( (k-\alpha)^2 \, | \, p(k) \) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) = B\,x^2\,e^{\alpha\,x} \) \\ \textcolor{white}{.} }} \\ \cline{3-6} & & \multirow{2}{*}{\parbox{5.00cm}{ \textcolor{white}{.} \center \(q(x)=C\sin\left(\beta\,x\right)+D\cos\left(\beta\,x\right)\)}} & {\parbox{2.10cm}{\center\( p(i\,\beta) \ne 0 \) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) = E\sin\left(\beta\,x\right)+F\cos\left(\beta\,x\right) \) \\ \textcolor{white}{.} }} \\ \cline{4-6} & & & {\parbox{2.10cm}{\center\( p(i\,\beta) = 0 \) }} & \multicolumn{2}{c|}{\parbox{8.40cm}{\center \( y_p(x) = x\left( E\sin\left(\beta\,x\right)+F\cos\left(\beta\,x\right) \right) \) \\ \textcolor{white}{.} }} \\ \hline \end{tabular} \end{center} \end{document}` e la tabella che ne è uscita è questa(click).

    Ora, l’ultima mia esigenza è quella di centrare verticalmente i contenuti delle celle. Ho cercato di mettere in pratica ciò che mi è stato scritto ma senza riuscirci (sempre per colpa mia, sia chiaro).
    Non è che qualcuno potrebbe farmi un esempio su una cella del codice da scrivere per sistemare questa ultima cosa? Ciò fatto, per adesso non vi rompo più, promesso 😀

    Nicola

    Go to top