Question: Finding the minimum function

Hello, Suppose I have two sinusoids with the same amplitude and frequency. By changing the phase of one of them it is possible to 'align' them. When the phases are exactly the same the difference between the two sinusoids becomes zero. Now lets define a variable (U[int]) that gives a measure of the difference between the two sinusoids and change the phase phi to generate an animation and 3D plot and see if it is possible to mathematically determine that the difference becomes zero when the phases of the waveforms are equal. Chosing a time t>0 and solving for the derivative does the job.

My question is, can (and how can) Maple determine for which phase phi we have the minimum function without chosing a time t.
 

restart

with(plots):

u[G] := sin(omega*t)

u[L] := sin(omega*t+phi)

U[int] := int((u[G]-u[L])^2, t)+C

C := solve(subs(t = 0, U[int]) = 0, C)

omega := 9:

animate(plot, [[u[G], u[L], (1/10)*U[int]], t = 0 .. 2, legend = ["Public grid voltage", "Local grid voltage (control goal)", "Cum. Actuator voltage (scaled)"]], phi = -Pi .. Pi, gridlines = true, labels = ["Time [s]","Voltage [V]"], labeldirections = ["horizontal", "vertical"], labelfont = ["ARIAL", "bold", 12])

plot3d(U[int], t = 0 .. 2, phi = -Pi .. Pi, shading = zhue, orientation = [-150, 70, 15])

t := 1:

phi = fsolve(diff(U[int], phi))


Download 20131114_Finding_min.mw

 

Thanks a lot!

Please Wait...