My question is: in electromagnetic waves, if we consider the electric field as a sine function, the magnetic field will be also a sine function, but I am confused why that is this way.
If I look at Maxwell's equation, the changing magnetic field generates the electric field and the changing electric field generates the magnetic field, so according to my opinion if the accelerating electron generates a sine electric field change, then its magnetic field should be a cosine function because $\frac{d(\sin x)}{dx}=\cos x$.