필터 지우기
필터 지우기

Problem Integrating sin(2*x)

조회 수: 7 (최근 30일)
Ricardo
Ricardo 2014년 3월 5일
댓글: Gustavo Leal 2017년 10월 9일
>> syms x >> f=sin(2*x)
f =
sin(2*x)
>> int(f)
ans =
sin(x)^2
>>
I am sure it is wrong because it should be -1/2+sin(x)^2

채택된 답변

Paul
Paul 2014년 3월 5일
The integral is:
sin(x)^2 + C
but Matlab just doesn't show the constant. How do you get the -1/2? Because if you differentiate the integral (sin(x)^2 + C) you get:
2*sin(x)*cos(x) = sin(2*x)
And the constant differentiated gives 0 since it doesnt depend on x.
  댓글 수: 4
Ricardo
Ricardo 2014년 3월 5일
편집: Ricardo 2014년 3월 5일
All right, Thanks!!
Gustavo Leal
Gustavo Leal 2017년 10월 9일
sin(pi)^2 != -cos (2pi)/2 ,for example, something its wrong with this function at MATLab

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by