Translating sigma notation / summation / series and integral equation from Microsoft Word into MATLAB syntax and graphing / plotting

조회 수: 1 (최근 30일)
Hello everybody,
I have a little trouble here. I trying to graph/plot the following equation with MATLAB. I already solved the integral of this equation:
f(t)=0.111627907+∑_(n=1)^∞▒〖(1/430 ∫_0^50▒〖((-0.000003072(t-25)^4+1.2) cos⁡(2nπt/860) )dt(nπt/430))〗〗+∑_(n=1)^∞▒〖(1/430 ∫_0^50▒〖((-0.000003072(t-25)^4+1.2 ) sin⁡(2nπt/860) )dt(nπt/430))〗〗
f(t)=0.111627907+∑_(n=1)^∞▒(1/430 1/((π)^4 n^4 ) (-177504/5 (π)^2 n^2+7876917504/125)+1(π)^5 n^5 (-177504/625 (-6450(π)^2 n^2+3816336) sin⁡(5/43 πn)-17750462/5 (125(π)^3 n^3-221880πn) cos⁡(5/43 πn) )(nπt/430)) +∑_(n=1)^∞▒〖(1/430 1/((π)^5 n^5 )(45796032/25 (π)^2 n^2-677414905344/625)+1/((π)^5 n^5 )(-177504/625 (6450(π)^2 n^2-3816336)cos(5/43 πn)-177504/625 (125(π)^3 n^3-221880πn)sin(5/43 πn)(nπt/430))〗
  댓글 수: 6

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

답변 (1개)

Walter Roberson
Walter Roberson 2019년 8월 20일
syms n t
Q = @(v) sym(v); %convert to rational
Pi = sym('pi');
f1 = Q(0.111627907);
f2a = int((Q(-0.3072*10^(-5))*(t - 25)^4 + Q(1.2))*cos((2*n*Pi*t)/860), t, 0, 50)
f2 = symsum(1/430*f2a*n*Pi*t/430, n, 1, inf)
f3a = int((Q(-0.3072*10^(-5))*(t - 25)^4 + Q(1.2))*sin((2*n*Pi*t)/860), t, 0, 50)
f3 = symsum(1/430*f3a*n*Pi*t/430, n, 1, inf)
f(t) = f1 + f2 + f3;
However, f2 returns NaN. Tracing in a different package, the computation does look suspicious.
  댓글 수: 4
Walter Roberson
Walter Roberson 2019년 8월 21일
When I did some investigation, I could see that in at least one way of writing the formulas you could end up with a partial term of -inf*(A-1) for some formula A. Under the circumstances it was probably reasonable to work out that A-1 would be positive, giving you -inf as a result. But if you expand then you get -inf*A -inf*(-1) and that leads you to -inf + inf for positive A and that is NaN. It is not exactly wrong, but it is a limitation on the analysis.
Taosui Li
Taosui Li 2019년 8월 21일
Thank you very much.
I try to do more research on why a negative infinity is returned.

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by