Let $R$ be a ring, $S = \mathrm{Spec}(R)$.
The algebraic de Rham cohomology is
$$H^i_{dR}(S/R) \cong \begin{cases} R & i=0 \\ 0 & i>0 \end{cases}$$
Then I would expect of the disjoint union
$$H^i_{dR}(S\coprod S/R) \cong \begin{cases} R\oplus R & i=0 \\ 0 & i>0 \end{cases}$$
however my calculations show
$$H^i_{dR}(S\coprod S/R) \cong? \begin{cases} R & i=0 \\ R & i=1 \end{cases}$$
Would you kindly identify the source of my stupidity?
Set $A := R[x]/(x(x-1))$, so that $\mathrm{Spec}(A) = \mathrm{Spec}(R) \coprod \mathrm{Spec}(R)$.
There is a representation of each element $$A\ni a = r_0 + r_1x$$ $$\Omega_{A/R} \ni \omega = (s_0 + s_1x)dx$$ for some $r_i,s_i \in R$
The de Rham complex is
$$A\xrightarrow{d}\Omega_{A/R}$$ $$r_0 + r_1x \mapsto (r_1 + 0x)dx$$
Then $$\mathrm{ker}(d) = \{r_0 + 0x\} \subset A$$ $$\mathrm{im}(d) = \{(s_0 + 0x)dx\} \subset \Omega$$ $$\mathrm{coker}(d) \cong \{(0 + s_1x)dx\} \cong R$$
So it looks like both $H^0_{dR}, H^1_{dR}$ are isomorphic to $R$. Is that what's supposed to be?
Inside the ring $A$, one has $x^2-x=0$. Thus inside $\Omega_{A/R}$ we know $$0=d(x^2-x)=2xdx-dx=(2x-1)dx.$$ Since $2x-1$ is a unit in $R$ (to see this you can either use the Chinese remainder theorem or check explicity that in fact it is its own inverse), this implies $dx=0$. Thus $\Omega_{A/R}=A$ and $$d:A\to \Omega_{A/R}$$ is just the identity. This now yields the correct cohomology groups.