Solve an definite integral with variable constants
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kyle Langford
am 4 Feb. 2022
Kommentiert: Kyle Langford
am 4 Feb. 2022
I don't know why I am having such a hard time with this.
I am trying to solve a definite integral with additional constant variables, but MATLAB doesn't want to compute it.
I want to do something along these lines, and have my final answer involve 'n'.
clear;clc;
syms t n
T=2*pi
A_0=@(t) 1/2*pi
A_n(t)=@(t) (2/T)*cos(n*t)
B_n(t)= (2/T)*sin(n*t)
A0=integral(A_0,-pi,pi)
An=integral(A_n,-pi,pi)
Bn=integral(B_n,-pi,pi)
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 4 Feb. 2022
syms t n
Pi = sym(pi)
T=2*Pi
A_0(t) = 1/2*Pi
A_n(t) = (2/T)*cos(n*t)
B_n(t) = (2/T)*sin(n*t)
A0 = int(A_0, t, -Pi, Pi)
An = int(A_n, t, -Pi, Pi)
Bn = int(B_n, t, -Pi, Pi)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!