I am currently studying the textbook A Student's Guide to the Schrödinger Equation by Daniel Fleisch. Chapter 1.6 Finding Components Using the Inner Product presents the following:
To see how this works, consider a function $\mid \psi(x) \rangle$ expanded using the basis functions $\mid \psi_1 \rangle = \sin(x)$, $\mid \psi_2 \rangle = \cos(x)$, $\mid \psi_3(x) \rangle = \sin(2x)$ over the interval $x = -\pi$ to $x = \pi$: $$\psi (x) = 5 \mid \psi_1 (x) \rangle - 10 \mid \psi_2(x) \rangle + 4 \mid \psi_3(x) \rangle.$$ In this case, you can read the components $c_1 = 5$, $c_2 = -10$, $c_3 = 4$ directly from this equation for $\psi(x)$. But to understand how Eq. 1.36 gives these values, write $$c_1 = \dfrac{\int^{\infty}_{-\infty} \psi_1^*(x) \psi(x) \ dx}{\int_{-\infty}^{\infty} \psi_1^* (x) \psi_1(x) \ dx} = \dfrac{\int_{-\pi}^{\pi} [\sin(x)]^*[5\sin(x) - 10\cos(x) + 4\sin(2x)] \ dx}{\int_{-\pi}^{\pi} [\sin(x)]^* [\sin(x)] \ dx}$$ ...
I'm a bit confused by the $[\sin(x)]^*$. The $*$ denotes the complex conjugate, but $\sin(x)$ is not a complex function, right? So don't we have that $[\sin(x)]^* = \sin(x)$? Or am I misunderstanding something?
I would greatly appreciate it if people would please take the time to clarify this.
The $\sin$ seen in your question is the sine of the real variable $x \in \mathbb{R}$ and so is the real-valued $\sin(x)$.
There does exists a complex-valued $\sin(z)$ given by the values to which the power series
$$\sin(z) = z - \frac{z^3}{3!} + \frac{z^5}{5!} - ... \frac{z^{2n+1}}{(2n+1)!} + ... = \sum_{n=0}^{\infty} \frac{(-1)^nz^{2n+1}}{(2n+1)!}$$
converges.
In general, if you are using unnormalized (but still orthogonal) basis vectors, i.e. ones not satisfying $\langle i | j \rangle = \delta_{ij}$, then you can find the coefficients of an arbitrary vector
$$\mid \psi \rangle = \sum_{i=1}^{n} c_i | i \rangle$$
by calculating the inner products
$$c_j = \frac{\langle j | \psi \rangle}{\langle j | j \rangle}.$$
When the basis vectors are normalized (as they often will be in quantum), then $\langle j | j \rangle = 1$ so you only need to compute $\langle j | \psi \rangle$.