The discriminant of a number field extension is defined as the discriminant of the ring of integers with respect to the integral basis. This number is always same regardless of which integral basis you use. On the other side the discriminant of a basis of $\mathbb{Q}(\sqrt d)$ or in general of any extension depends on the basis.
So in your case you need to prove that the ring of integers of $\mathbb{Q}(\sqrt{d})$ is:
$$\begin{align*} \mathbb{Z}[\sqrt{d}],&\quad\text{if } d \not\equiv 1\text{ mod }4\\
\mathbb{Z}\left[\frac{1+\sqrt{d}}{2}\right],&\quad\text{if } d\equiv 1\text{ mod }4
\end{align*}$$
To prove this let $\alpha \in O_k \subset \mathbb{Q}(\sqrt{d})$, the ring of integers. Then we have that $\alpha = \frac{a+b\sqrt{d}}{c}$ and we might assume that $\gcd(a,b,c)=1$. Then it's minimal polynomial is $x^2 - \frac{2a}{c}x + \frac{a^2 - db^2}{c^2} \in \mathbb{Z}[x]$
If $\gcd(a,b) = m$, then the free coefficient gives us that $m \mid b$, as $d$ can be assumed to be squarefree, which is impossible. So $m=1$ and $c\mid 2$, so we consider two cases $c=1,2$. $c=1$ will yield the elements of $\mathbb{Z}[\sqrt{d}]$, so we need to check when $c=2$ is possible. If this is the case then we have that $4 \mid a^2 - db^2$ and so $m$ is a quadratic residue modulo $4$ and as it's squarefree we must have $d \equiv 1 \pmod 4$.
This gives us that an integral basis $\mathbb{Q}$ is:
$$\begin{align*} \{1,\sqrt d\},&\quad\text{if }d \not\equiv 1\text{ mod }4\\
\left \{1, \frac{1+\sqrt{d}}{2}\right \},&\quad\text{if } d\equiv 1\text{ mod }4
\end{align*}$$
Now you should be able to compute the discriminant in each case.
Best Answer
Define the norm on $\mathbb Z[\sqrt 3]$ to be $N(a + b \sqrt 3) = \vert a^2 - 3 b^2 \vert$.
Let $\alpha, \beta \in \mathbb Z[\sqrt 3]$ with $\beta \neq 0$.
Say $\alpha = a + b \sqrt 3$ and $\beta = c + d \sqrt 3$.
Notice that \begin{align*} \frac\alpha\beta &= \frac{a + b \sqrt 3}{c + d \sqrt 3} \cdot \frac{c - d \sqrt 3}{c - d \sqrt 3} \\ &= \frac{ac - 3bd}{c^2 - 3d^2} + \frac{-ad + bc}{c^2 - 3d^2} \sqrt 3 \\ &= r + s\sqrt 3 \end{align*}
where $r = \displaystyle \frac{ac - 3bd}{c^2 - 3d^2}$ and $s = \displaystyle \frac{-ad + bc}{c^2 - 3d^2}$.
Let $p$ be the closest integer to $r$ and let $q$ be the closest integer to $s$. Notice that $\vert r - p \vert \leq 1/2$ and $\vert s - q \vert \leq 1/2$.
We want to show that $\alpha = (p + q\sqrt 3) \beta + \gamma$ for some $\gamma \in \mathbb Z[\sqrt 3]$ such that either $\gamma = 0$ or $N(\gamma) < N(\beta)$. (We'll show the latter holds always.)
Define $\theta := (r - p) + (s - q)\sqrt 3$ and define $\gamma = \beta \cdot \theta \in \mathbb Z[\sqrt 3]$ and observe that \begin{align*} \gamma &= \beta \cdot \theta\\ &= \beta ( (r - p) + (s - q)\sqrt 3)\\ &= \beta (r + s\sqrt 3) - \beta(p + q\sqrt 3) \\ &= \beta \cdot\frac\alpha\beta - \beta (p + q\sqrt 3) \\ &= \alpha - \beta (p + q\sqrt 3) \end{align*}
Hence we have $\alpha = \beta(p + q\sqrt 3) + \gamma$.
Finally notice that \begin{align*} N(\gamma) &= N(\beta \cdot \theta) \\ &= N(\beta) \cdot N(\theta) \\ &= N(\beta) \cdot \vert (r - p)^2 - 3 (s - q)^2 \vert \\ &\leq N(\beta) \cdot \max\{ (r - p)^2, 3(s - q)^2\} \\ & \leq\frac34 N(\beta)\\ &< N(\beta) \end{align*}
The key here was that $\vert (r - p)^2 - 3 (s - q)^2 \vert \leq \max\{ (r - p)^2, 3(s - q)^2\}$ since $(r - p)^2, 3(s - q)^2 \geq 0$ and then we use that $(r - p)^2 \leq 1/4$ and $3(s - q)^2 \leq 3/4$.