MaplePrimes Announcement

The complete Maple Conference 2024 program is now available online. You can view it HERE.
Thank you to all those who voted for the "Audience Choice" sessions. The winning topics are listed in the program.

Registration is still open and free of charge.  

We hope to see you there!

Featured Post

In this post, I would like to share some exercises that I recently taught to an undergraduate student using Maple. These exercises aimed to deepen their understanding of mathematical concepts through computational exploration and visualization. With its powerful symbolic computation capabilities, Maple proved to be an excellent tool for this purpose. Below, I present a few of the exercises and the insights they provided. Interestingly, the student found Maple to be more user-friendly and efficient compared to the software he usually uses for his studies. Below, I present a few of the exercises and the insights they provided.

One of the first topics we tackled was the Fourier series. We used Maple to illustrate how the Fourier series approximates a given function as more terms are added. We explored this through both static plots and interactive animations.

To help the student understand the behavior of different types of functions, we defined piecewise functions using Maple's piecewise command. This allowed us to model functions that behave differently over various intervals, such as the following cubic function exercise

Maple's Explore command was an effective tool for creating an interactive learning environment. We used it to create sliders that allowed the student to vary parameters, such as the number of terms in a Fourier series, and see the immediate impact on the plot.

restart; with(plots)

" F(x):={[[-1,-1<x<0],[1,0<x<1]];  "

proc (x) options operator, arrow, function_assign; piecewise(-1 < x and x < 0, -1, 0 < x and x < 1, 1) end proc

(1)

p1 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

 

L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

0

(2)

a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(3)

b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(4)

" #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));"

proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

(5)

p2 := plot([F__fourier(x, 40)], x = -3 .. 3, numpoints = 200, color = [purple])

display([p1, p2])

 

Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

restart; with(plots)

" #` Define the piecewise function`  F(x):={[[0,-1<x<0],[x^(2),0<x<1]];  "

proc (x) options operator, arrow, function_assign; piecewise(-1 < x and x < 0, 0, 0 < x and x < 1, x^2) end proc

(6)

p3 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

 

L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

1/6

(7)

a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(8)

b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(9)

" #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));"

proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

(10)

p4 := plot([F__fourier(x, 40)], x = -3 .. 3, numpoints = 200, color = [purple])

display([p3, p4])

 

Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

restart; with(plots)

" #` Define the piecewise function`  F(x):={[[x+2,-2<x<0],[2-2 x,0<x<2]]; "

proc (x) options operator, arrow, function_assign; piecewise(-2 < x and x < 0, x+2, 0 < x and x < 2, 2-2*x) end proc

(11)

p5 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

 

L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

5/4

(12)

a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(13)

b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(14)

" #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));"

proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

(15)

p6 := plot([F__fourier(x, 40)], x = -3 .. 3, numpoints = 200, color = [purple])

display([p5, p6])

 

Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

restart; with(plots)

F := proc (x) options operator, arrow; piecewise(-1 < x and x < 1, x-x^3, 0) end proc

proc (x) options operator, arrow; piecewise(-1 < x and x < 1, x-x^3, 0) end proc

(16)

p7 := plot(piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), x = -3 .. 3, color = blue)

 

L := 2; a__0 := (int(F(x), x = -(1/2)*L .. (1/2)*L))/L

0

(17)

a__n := proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*cos(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(18)

b__n := proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

proc (n) options operator, arrow; 2*(int(F(x)*sin(2*n*Pi*x/L), x = -(1/2)*L .. (1/2)*L))/L end proc

(19)

b__n(n)

-4*(n^2*Pi^2*sin(n*Pi)+3*cos(n*Pi)*Pi*n-3*sin(n*Pi))/(n^4*Pi^4)

(20)

" #` Fourier series function`  `F__fourier`(x,N):=`a__0`+(&sum;)(`a__n`(n)&lowast;cos(2 * n * Pi * x / L) +`b__n`(n)&lowast;sin(2* n * Pi * x / L));      #` Plot the Fourier series approximation`  p8:=plot([`F__fourier`(x,40)],x = -3.. 3 ,numpoints=200, color=[red]) :"

proc (x, N) options operator, arrow, function_assign; a__0+sum(a__n(n)*cos(2*n*Pi*x/L)+b__n(n)*sin(2*n*Pi*x/L), n = 1 .. N) end proc

(21)

display([p7, p8])

 

Explore(plot([piecewise(-3 < x and x < -1, F(x+2), -1 < x and x < 1, F(x), 1 < x and x < 3, F(x-2)), F__fourier(x, N)], x = -3 .. 3, color = [blue, purple], numpoints = 200), N = 1 .. 40, title = "Fourier Series Approximation with N Terms")

NULL

Download Fourier_Series.mw

Featured Post

The flag of Germany on the strip of the German mathematician August Ferdinand Möbius. Basically, it's just one way to represent flags of a certain type. It seemed that the flag looked good on the Mobius strip.
FLAG.mw



How to solve this system?

Maple asked by Gabriel Ba... 45 Yesterday