-4

I have this trigonometric equation;

cos(2*pi*50*t)+cos(2*pi*100*t)

I want to graphic of equation and I want to find field for a period. How can I do?

enter image description here

Tuna EREN
  • 25
  • 4

1 Answers1

1

Graph:

>> f = @(t) cos(2*pi*50*t) + cos(2*pi*100*t);
>> x = linspace(0, 1/50, 100);
>> y = f(x);
>> plot(x,y)

Area over 1 period:

>> integral(f, 0, 1/50)

or just do it manually:

∫ ( cos(2π·50t) + cos(2π·100t) ) dt = 
-1/2π·( 1/50·sin(2π·50t) + 1/100·sin(2π·100t) )

which, evaluated between 0 and 1/50, equals 0.

Rody Oldenhuis
  • 37,726
  • 7
  • 50
  • 96
  • Good answer but I have problem. Yes, I find equals 0. Area below zero is negative. I want this to be positive too. I shared picture. I want to find the scanned area. – Tuna EREN Aug 10 '17 at 08:07
  • Take the absolute value of the output and find the integral. – rayryeng Aug 10 '17 at 08:21