# How to write the resultant equation of a wave formed by the superimposition if two waves?

I read that when two waves are superimposed we can find the resultant wave by adding the equations of the two waves. Now, I also learned that when two waves travelling along "same direction" and with "same frequency" are superimposed,the net amplitude of the resulting wave can be found by the treating the amplitudes of the individual vectors and the angle between the vectors as the phase difference between the two waves, this is called the phasor diagram method... But I have a couple of confusions with this formula:

• This same formula is used to measure the intensity of light on a point on the screen in a Youngs double slit experiment setup.
• Can this formula be used still for waves that are not travelling along the same direction,and do not have same frequency?
• Please give an example of how we can write the equation of a resultant wave formed by two waves with different frequencies.

If you have two waves, $$f(x,y,z ,t)$$ and $$g(x,y,z, t)$$, linear superposition says:

$$h(x,y,z ,t) = f(x,y,z ,t) + g(x,y,z ,t)$$

If they each have a frequency, then it can be written:

$$h(x,y,z ,t) = f_r(x,y,z)e^{i\omega_f t} + g_r(x,y,z)e^{(i\omega_g t + \phi)}$$

(Ofc, you take the real part). $$\phi$$ is a phase.

If those frequencies are the same:

$$h_r(x,y,z)= f_r(x,y,z) + g_r(x,y,z)e^{i\phi}$$

where I am not showing the $$e^{i\omega t}$$ on the RHS and LHS.

If they travel in the same direction, you factor the spatial part similarly, into longitudinal (envelope) and transverse (beam profile) part

$$h_L(x)e^{ikx} \times h_T(y, z)$$

and similarly for $$f$$ and $$g$$.

You can go from there, it's a lot of algebra.