I have looked at similar posts, such as this one, but none of the solutions have worked for me. I have an imaginary function, and I have tried to obtain its real part using Re, ComplexExpand with Re, Simplify with ComplexExpand with Re, among other methods. The function plots as expected almost every time, but when I differentiate it using methods like D or the deriv method mentioned in the post, and I obtain the value, it never comes out as accurate. Can anyone please help?
Edit: The function resembles a wave function and is of form $\sum a\sin(x)e^{b(t-tf)}$, where $a, b \in \alpha+\beta \iota$ and $\alpha \ne 0$. So ideally if we expand the function and collect only the real elements (without the Re applied to it), it should be differentiable.