Tải bản đầy đủ (.pdf) (160 trang)

TAP CHI TOAN UNG DUNG CONG NGHE VA GIAO DUC SO THU 2 THANG 72017

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (7.52 MB, 160 trang )

<span class='text_page_counter'>(1)</span>APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL No 02 - JULY, 2017. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC SỐ 2- THÁNG 7/2017 Ban biên tập: Henry Tran (chủ biên) Nguyễn Hồng Quân Nguyễn Hoàng Hải Hoàng Hồ Nam Trần Việt Tuấn Tú.

<span class='text_page_counter'>(2)</span> Lời Ban biên tập. Hè 2017 đã về, mùa chín đỏ của những quả Cherry (Anh Đào) vùng Bắc Mỹ, và ở nơi cách xa nửa vòng trái đất, phía bên kia bờ đại dương là nước Việt thân yêu cũng đang có mùa Phượng vỹ, mùa của tuổi học trò, mùa của sự chia tay để tiếp tục những hành trình mới của đời người. Tạp chí AMTJ cũng vậy, sẽ tiếp tục hành trình của mình, đó là chính thức thêm tên thành AMTEJ - Applied Mathematics, Technology and Education Journal-Tạp chí Toán ứng dụng, Công nghệ và Giáo dục kể từ số thứ 2 tháng 7/2017. Số báo ra đầu tiên ngày 4/5/2017 là một sự trùng hợp về ngày và cũng mang đến cho số báo tiếp theo một ý nghĩa nào đó trong ngày July, 04 (4/7/2017)- Quốc khánh Mỹ Một cường quốc có nhiều ứng dụng nhất trong Toán học và Công nghệ, và xa hơn là số thứ 3 của tạp chí cũng ra đời đúng dịp Quốc khánh Việt Nam (2/9/2017)- Đất nước của những tài năng Toán học và là mỏ vàng tiềm năng về Toán. Tạp chí tạp chí tiếp tục nhận được sự quan tâm của bạn đọc từ khắp nơi trên thế giới, từ các chuyên ngành khác nhau nhưng đều chung ý, chung lòng là khích lệ học sinh sinh viên, đặc biệt là bạn đọc từ Việt Nam và Mỹ. Các bài báo trong tạp chí sẽ tiếp tục được trình bày bằng tiếng Việt và tiếng Anh, trong đó, phần một là các bài báo bằng tiếng Việt sẽ có một vài đoạn trình bày bằng tiếng Anh với mục đích để các bạn HSSV làm quen với tiếng Anh, phần hai là các bài báo tiếng Anh của tạp chí eJMT sẽ được trình bày nguyên bản. Thay mặt Ban biên tập tạp chí AMTEJ, kính chúc bạn đọc một mùa hè với nhiều niềm vui và có nhiều đóng góp thiết thực. Trân trọng Henry Tran.

<span class='text_page_counter'>(3)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. MỤC LỤC Lê Phúc Lữ - FPT Software, TP.HCM, Vietnam. Tính xác suất trong trò chơi Bầu Cua Tôm Cá . . . . . . . . . . . . . . . . . . . . . . .. 4. Mai Xuân Việt - Trung tâm luyện thi Thủ Khoa,TP.HCM, Vietnam . . . . . . . . . .. 13. Các phương pháp sai phân hữu hạn cho phương trình đạo hàm riêng dạng Hyperbolic với lập trình MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 21. Lập trình trên máy tính khoa học cầm tay thông qua phương pháp lặp Henry Trần - Wayne State University, Michigan, USA.. J. Brian Conrey, The American Institute of Mathematics, USA Giả thiết Riemann (The Riemann Hypothesis) - Bài toán thiên niên kỉ chưa có lời giải và giải thưởng một triệu USD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 34. Minh Tran - Bowling Green State University, Ohio, USA Một vài ví dụ để thấy rằng các vật thể được biểu diễn bằng các phương trình toán học . .. 47. Trần Việt Tuấn Tú - Temple University, Pennsylvania, USA. Titanic Survival Prediction - Dự đoán sự sống sót của con tàu Titanic with Data Science and Machine Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 62. Alasdair McAndrew, College of Engineering and Science, Victoria University, Melbourne, Australia Exploring Runge-Kutta formulas with a computer algebra system . . . . . . . . . . . . .. 86. Wei-Chi Yang - University Radford, Virginia, USA; Alasdair McAndrew, Victoria University, Australia Locus and Optimization Problems in Lower and Higher Dimensions . . . . . . . . . . . 103 Yasuyuki Nakamura, Science Nagoya University Japan; Tetsuya Taniguchi, Kitasato University,Japan; Takahiro Nakahara,Sangensha LLC, Japan Item Bank System for the Mathematics e-Learning System STACK . . . . . . . . . . . . 118 Per-Eskil Persson Malmö University, Sweden How teachers can use TI-Nspire CAS with laptops in an upper secondary course . . . . . 126 Vladimir V. Shelomovskii, Russia; Wei–Chi Yang, Radford University Radford, Virginia, USA; Skip Thompson, Radford University Radford, Virginia, USA The Area of the Solid of Intersection of a Sphere and an Ellipsoid - a Parametric Approach 143. 3.

<span class='text_page_counter'>(4)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. TÍNH XÁC. SUẤT. TRONG TRÒ CHƠI BẦU CUA TÔM CÁ Lê Phúc Lữ FPT Software TP.HCM, Vietnam. TÓM TẮT VẤN ĐỀ Trò chơi dân gian Bầu cua tôm cá đã rất quen thuộc ở Việt Nam, từ thành thị cho đến nông thôn, đặc biệt là trong các ngày nghỉ lễ Tết. Luật chơi rất đơn giản, có một bàn gồm 6 mặt, gồm các hình: Bầu, Cua, Tôm, Cá, Gà, Nai và một con xúc sắc cũng có 6 mặt giống như thế. Ở mỗi lượt, nhà cái sẽ cho những người tham gia chơi đặt cược vào các mặt rồi sau đó tung xúc sắc. Kết quả sẽ cho biết người chơi nào được thưởng. Trò chơi này cũng được áp dụng trong các chương trình khuyến mãi của nhiều công ty, trong các lĩnh vực bán hàng hay giáo dục. Vấn đề đặt ra là trong trường hợp các mặt của xúc sắc không phải 6 mặt giống nhau là tùy thuộc vào thông tin do nhà cái muốn quyết định thì xác suất xảy ra là bao nhiêu để biết được rằng nên thưởng cho người chơi bao nhiêu cho phù hợp (sẽ có lợi theo mặt xác suất). Bài phân tích nhỏ dưới đây muốn đưa ra hướng giải quyết vấn đề này, cùng code hiện thực nó viết bằng Visual Basic 6.0 trên Macro của Microsoft Excel.. Bàn Bầu Cua Tôm Cá. 1. Giới thiệu và phân tích vấn đề Cho n con xúc sắc đặc biệt, mỗi con có các mặt “BẦU”, “CUA”, “TÔM”, “CÁ”, “NAI”, “GÀ” tùy ý, không nhất thiết là 1. Ở đây quy ước: các mặt trên có index là 0, 1, 2, 3, 4, 5 tương ứng trong các mảng dữ liệu. Tính xác suất để khi gieo đồng thời n con xúc sắc đó, ta nhận được một số mặt của các loại trên với số lượng mong muốn. 4.

<span class='text_page_counter'>(5)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Gọi N U M BE_OF _T Y P E là số lượng các loại mặt xuất hiện trong trò chơi này, ở đây ta có giá trị số này bằng 6, tương ứng với 6 loại mặt. Xét dữ liệu List < int[N U M BER_OF _T Y P E] > dices thể hiện thông tin của các con xúc sắc, bao gồm tất cả n phần tử là < dices[0], dices[1], . . . , dices[n − 1] > . Mỗi phần tử như thế lại là 1 mảng chứa số lượng mặt của con xúc sắc tương ứng. Chẳng hạn con xúc sắc thứ 1 có 3 mặt là “BẦU”, 1 mặt là “CUA”, 1 mặt là “TÔM”, 1 mặt là “CÁ”, 4 mặt là “NAI” và 0 mặt là “GÀ” thì ta có: dices[0] = (3, 1, 1, 1, 4, 0). Kết quả mong muốn cũng có dạng một danh sách như sau: List < KeyV alueP airs < int, int >> result. trong đó, số lượng phần tử của list này sẽ không vượt quá N U M BER_OF _T Y P E (không nhất thiết bằng đúng số này mà có thể nhỏ hơn), cho biết số lượng tương ứng của các mặt muốn có được. Chẳng hạn, ta muốn tính xác suất để khi tung các con xúc sắc, ta thu được đúng 2 mặt “BẦU”, 1 mặt “CUA” và không có mặt nào là “GÀ”, ta có: result = (< 0, 2 >, < 1, 1 >, < 0, 5 >) Ràng buộc dữ liệu: 1. Mỗi key xuất hiện không quá 1 lần. 2. Tổng các value của tất cả các cặp phải không vượt quá n là số lượng xúc sắc. 3. Các dữ liệu vi phạm ràng buộc này đều cho ra xác suất bằng 0.. 2. Cách tính xác suất Gọi A là biến cố thỏa mãn đề bài, không gian mẫu của phép thử tung xúc sắc là Ω Khi đó, ta cần tính. P (A) =. n(A) n(Ω). Bước 1. Tính n(Ω) • Đầu tiên, ta tính tổng số lượng các mặt của các con xúc sắc (tính tổng của 6 phần tử), đặt là a0 , a1 , a2 , . . . , an−1 . Rõ ràng các số này đều phải là số lớn hơn 0. 5.

<span class='text_page_counter'>(6)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. • Khi đó: n(Ω) = a0 .a1 .a2 . . . an−1 . Bước 2. Tính n(A) Bước này là quan trọng nhất. Đầu tiên, ta kiểm tra trong các giá trị values của mặt, có giá trị nào là 0 hay không. Nếu có, nghĩa là các mặt tương ứng không được xuất hiện, ta duyệt mảng dữ liệu các con xúc sắc và loại ra các mặt vi phạm được một bộ xúc sắc mới. Nếu có một con xúc nào còn lại 0 mặt, ta trả về kết quả là 0. Tiếp theo, ta sẽ trải qua các bước sinh các thông tin: Bước 2.1. Sinh ra dãy giá trị mong muốn. Ta cần làm điều này vì nếu giữ nguyên thông tin ban đầu sẽ khó đếm số lượng các trường hợp. Chẳng hạn, từ yêu cầu cần có: 2 con “BẦU”, 3 con “CUA”, 1 con “CÁ”, ta sinh ra dãy số sau: 0, 0, 1, 1, 1, 2. Giả sử độ dài của dãy này là k.Chú ý rằng ta sẽ không tính hoán vị của dãy này mà giữ cố định như thế trong các vòng lặp tiếp sau đó. Ta đặt tên cho dãy này là: x0 · x1 · x2 . . . xn−1 với 0 ≤ xi < N U M BER_OF _T Y P E Bước 2.2. Sinh ra dãy index của xúc sắc. Ở bước này, ta sinh ra tất cả các chỉnh hợp chập k, tức là các bộ số phân biệt nhau có tính thứ tự lấy ra từ tập hợp index = 0, 1, 2, 3, . . . , n. n! bộ như thế. Do ở đây, các con xúc sắc có thông tin không nhất thiết giống nhau Có tất cả (n−1)! nên ta buộc phải xem xét cho từng trường hợp. Tương tự, ta đặt tên cho dãy index này là: (y0 , y1 , y2 ...yn−1 ) với 0 ≤ yi < n.. Bước 2.3. Ép hai dãy trên lại và tính trường hợp. Khi đã chọn được hai dãy như trên, ta sẽ tính số trường hợp của mệnh đề: Với mọi i = 0, 1, 2, . . . , k − 1, con xúc sắc thứ yi phải thu được mặt là xi , giả sử ta có tất cả zi lựa chọn như thế. Tiếp theo, với n − k con xúc sắc còn lại, các con đều không được chứa bất cứ mặt nào trong dãy kết quả (ta cũng phải duyệt tuần từ từng con và loại đi các mặt đã sử dụng ở bước 2.1). Ta gọi số lượng này là: tk , tk+1 , . . . , tn−1 . Từ đó, suy ra số trường hợp thực hiện được ở đây là z0 · z1 · z2 . . . zk−1 · tk · tk+1 . . . tn−1 6.

<span class='text_page_counter'>(7)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Ta cộng thêm giá trị này vào n(A) là số trường hợp mong muốn và chuyển qua chỉnh hợp tiếp theo sinh ra được ở bước 2.2. Bước 3. Tính xác suất P(A): Khi đã có 2 giá trị n(A), n(Ω), ta chia n(A) có số lượng hoán vị của các giá trị giống nhau và cứ thế. (chẳng hạn cần 3 mặt “BẦU” thì sau đó, ta chia n(A) 3! Cuối cùng, xác suất cần tính chính là P (A) =. n(A) . n(Ω). 3. Ví dụ mô phỏng thuật toán Với dữ liệu chuẩn thông thường là 3 con xúc sắc có 6 mặt khác nhau, ta cần tính xác suất để có 2 con “BẦU” thì dữ liệu và các bước trên cụ thể như sau dices = (1, 1, 1, 1, 1, 1), (1, 1, 1, 1, 1, 1), (1, 1, 1, 1, 1, 1)vresult = (0, 2) Không gian mẫu tính được là n(Ω) = 6 · 6 · 6 = 216. Dãy số ở bước 2.1 là: 0, 0 Các bộ tính thứ tự ở bước 2.2 là: (0, 1), (1, 0), (0, 2), (2, 0), (1, 2), (2, 1). Xét bộ index (0, 1), nghĩa là con xúc sắc thứ 0 và 1 đều phải cho ra kết quả là “BẦU”, con xúc sắc còn lại không phải bầu nên có 5 cách chọn. Do đó, số lượng cần tìm ở đây là: 1 · 1 · 5 = 5. Duyệt qua hết 6 bộ số, ta được n(A) = 6 · 5 = 30. Tuy nhiên, do ở đây ta xét 2 con “BẦU” giống nhau nên n(A) −→ Xác suất cho biến cố A này là:. n(A) = 15. 2!. 15 . 216. 4. Đánh giá Ta cần thực hiện tương đối phức tạp bởi vấn đề đặt ra tổng quát, không còn các khác hay mẹo nào để thu gọn việc tính toán. Do độ phức tạp của thuật toán ở đây là O(n!) nên trong trường hợp n ≤ 12 thì thuật toán chạy tốt trong thời gian 1-2 giây. Nếu n lớn hơn, thời gian thực hiện tăng theo lũy thừa nên thuật toán sẽ chạy khá lâu mới duyệt hết được.. 7.

<span class='text_page_counter'>(8)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 5. Code mẫu bằng VisualBasic 6 hiện thực ý tưởng Type Dictionary Key As Integer Value As Integer End Type Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public. Const NumberFace = 6 NumberDices As Integer TotalRequire As Integer RequireResultNumber As Integer Dices(10, NumberFace) As Integer TempIndex(NumberFace) As Integer RequireResult(NumberFace) As Dictionary Const StartIndexRow = 3 Const StartIndexColumn = 1 Const StartColumnInfor = 17 TypeCalculation As Integer ’ 0 as compute single value, 1 as compute whole table Numerator As Long Demoninator As Long NameOfFace(NumberFace) As String StringName(10) As String FailPercent As Double. Public Sub Probability() TypeCalculation = 0 Initial ’initialize the data ’ ’ checking condition ’ If NumberDices > 10 Then MsgBox ("The number of dices should be not greater than 10") Exit Sub End If Compute ’compute the probability End Sub Private Sub Initial() ’ setting name For i = 0 To NumberFace - 1 NameOfFace(i) = Cells(2, StartColumnInfor + i).Value Next i If NumberDices > 10 Then Exit Sub End If For i = 0 To NumberDices - 1 For j = 0 To NumberFace - 1 Dices(i, j) = CLng(Val(Cells(3 + i, StartColumnInfor + j).Value)) Next j Next i If TypeCalculation = 1 Then Exit Sub End If k = 0 For i = 0 To NumberFace - 1 If Cells(14, StartColumnInfor + i).Value <> "" Then RequireResult(k).Key = i RequireResult(k).Value = CLng(Val(Cells(14, StartColumnInfor + i).Value)) k = k + 1 End If Next i RequireResultNumber = k End Sub Public Sub Compute() Dim ListZero(NumberFace) As Integer Dim TotalZero As Integer. 8.

<span class='text_page_counter'>(9)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 Dim Dim Dim Dim Dim. TempRequireResult(NumberFace) As Dictionary ConvertList(NumberFace) As Integer CurrentIndex(NumberFace) As Integer Index As Integer CountingCase As Long. ’ initialize Numerator = 0 Demoninator = 1 Initial TotalZero = 0 TotalRequire = 0 TotalCase = 0 ’ multiple all number of faces of dices For i = 0 To NumberDices - 1 Dim SumOfFaceOfDice As Integer SumOfFaceOfDice = 0 For j = 0 To NumberFace - 1 SumOfFaceOfDice = SumOfFaceOfDice + Dices(i, j) Next j Demoninator = Demoninator * SumOfFaceOfDice Next i ’ if there is some dice don’t have any face, then break the calculation process If Demoninator = 0 Then Numerator = 0 Exit Sub End If ’ add all key of the face with the require number is ZERO For i = 0 To RequireResultNumber - 1 If RequireResult(i).Value = 0 Then ListZero(TotalZero) = RequireResult(i).Key TotalZero = TotalZero + 1 End If Next i ’ remove the face of dices with zero For i = 0 To TotalZero - 1 For j = 0 To NumberFace - 1 Dices(j, ListZero(i)) = 0 Next j Next ’ update the require result k = 0 For i = 0 To RequireResultNumber - 1 If RequireResult(i).Value <> 0 Then TempRequireResult(k).Key = RequireResult(i).Key TempRequireResult(k).Value = RequireResult(i).Value k = k + 1 End If Next i RequireResultNumber = k For i = 0 To RequireResultNumber - 1 RequireResult(i).Key = TempRequireResult(i).Key RequireResult(i).Value = TempRequireResult(i).Value Next i ’ now we find the total situations For i = 0 To RequireResultNumber - 1. 9.

<span class='text_page_counter'>(10)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017 TotalRequire = TotalRequire + TempRequireResult(i).Value Next i ’ if the number of require face is greater than the number of dice, the probability is ZERO If TotalRequire > NumberDices Then Numerator = 0 If TypeCalculation = 0 Then MsgBox ("Probability is: " & Numerator & "/" & Demoninator & vbCrLf & "Reduce form is: 0") Exit Sub End If ’ convert the require result into a list of number t = 0 ’ index of new list For i = 0 To RequireResultNumber - 1 For j = 0 To RequireResult(i).Value - 1 ConvertList(t) = RequireResult(i).Key t = t + 1 Next j Next i ’ sort from smallest to biggest For i = 0 To t - 1 For j = i + 1 To t - 1 If ConvertList(i) > ConvertList(j) Then temp = ConvertList(i) ConvertList(i) = ConvertList(j) ConvertList(j) = temp End If Next j Next i ’ create all needed subset For i = 0 To TotalRequire - 1 CurrentIndex(i) = i Next i Do For i = 0 To TotalRequire - 1 TempIndex(i) = CurrentIndex(i) Next i ’ processing here CountingCase = 0 Do Dim Cur As Integer Cur = 1 For i = 0 To TotalRequire - 1 Cur = Cur * Dices(TempIndex(i), ConvertList(i)) Next i CountingCase = CountingCase + Cur Loop While NextPermutation For i = 0 To NumberDices - 1 Flag = 0 For j = 0 To TotalRequire - 1 If TempIndex(j) = i Then Flag = Flag + 1 End If Next j If Flag = 0 Then ’ calculate the total faces of current dice. 10.

<span class='text_page_counter'>(11)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 Total = 0 For j = 0 To NumberFace - 1 Total = Total + Dices(i, j) Next j ’ check the current face belongs to require result For j = 0 To NumberFace - 1 Flag = 0 For t = 0 To RequireResultNumber - 1 If RequireResult(t).Key = j Then Flag = Flag + 1 End If Next t If Flag > 0 Then Total = Total - Dices(i, j) End If Next CountingCase = CountingCase * Total End If Next i Numerator = Numerator + CountingCase ’find the new subset Dim CheckStatus As Boolean CheckStatus = True Index = TotalRequire - 1 While Index >= 0 And CheckStatus If CurrentIndex(Index) = NumberDices - TotalRequire + Index Then Index = Index - 1 Else CheckStatus = False End If Wend If Index >= 0 Then CurrentIndex(Index) = CurrentIndex(Index) + 1 For j = Index + 1 To TotalRequire - 1 CurrentIndex(j) = CurrentIndex(j - 1) + 1 Next End If Loop While Index >= 0 For i = 0 To RequireResultNumber - 1 Numerator = Numerator / Factorial(RequireResult(i).Value) Next i ’ check if numerator is 0 If Numerator = 0 Then If TypeCalculation = 0 Then MsgBox ("Probability is: " & Numerator & "/" & Demoninator & vbCrLf & "Reduce form is 0") End If Exit Sub End If Dim Reduce As Integer Reduce = GCD(Numerator, Demoninator) If TypeCalculation = 0 Then MsgBox ("Probability is: " & Numerator & "/" & Demoninator & vbCrLf & "Reduce form is: " & Numerator / Reduce & "/" & Demoninator / Reduce & " = " & Round(Numerator / Demoninator, 4)) Cells(4, 16) = Demoninator End Sub ’ find the greatest common divisor of two positive integers Public Function GCD(ByVal x As Long, ByVal y As Long) As Long While x > 0. 11.

<span class='text_page_counter'>(12)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017 Dim Current As Long Current = x x = y Mod x y = Current Wend GCD = y End Function ’ calculate the factorial Public Function Factorial(num As Integer) As Integer res = 1 For i = 2 To num res = res * i Next i Factorial = res End Function ’ construct the permutation of the list Public Function NextPermutation() Dim k As Integer Dim l As Integer k = TotalRequire - 2 Dim CheckStatus As Boolean CheckStatus = True While k >= 0 And CheckStatus If TempIndex(k) >= TempIndex(k + 1) Then k = k - 1 Else CheckStatus = False End If Wend If k < 0 Then NextPermutation = False Exit Function End If l = TotalRequire - 1 CheckStatus = True While l > k And CheckStatus If TempIndex(l) <= TempIndex(k) Then l = l - 1 Else CheckStatus = False End If Wend tmp = TempIndex(k) TempIndex(k) = TempIndex(l) TempIndex(l) = tmp i = k + 1 j = TotalRequire - 1 While i < j tmp = TempIndex(i) TempIndex(i) = TempIndex(j) TempIndex(j) = tmp i = i + 1 j = j - 1 Wend NextPermutation = True Exit Function End Function. 12.

<span class='text_page_counter'>(13)</span> L P TRÌNH TRÊN MÁY TÍNH C M TAY A M L T EP J THÔNG QUA PHƯƠNG PHÁP APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Mai Xuân Vi t - Trung tâm luy n thi Th Khoa Gi i thiêu: Máy tính c m tay thực sự là một công cụ rất đắc lực cho giáo viên và h c sinh trong quá trình dạy và học hiện nay. Máy tính ngày nay có nhiều chức năng giúp đơn giản hoá và tối ưu hoá các quá trình tính toán, và đ c bi t là máy tính c m tay còn có ch c năng l p trình thông qua phương pháp l p, đ gi i các bài toán ph c t p mà các phương pháp tính toán thông thư ng không th gi i quy t đư c. Sau đây tôi xin trình bày một trong những chức năng ưu việt như thế, đó là l p trình b ng phương pháp l p. Dạng 1: Tính giá trị của một biểu thức. 1. 11. 1. .  1    . . . . . . . . .... Thí dụS1 1: 20! 2 6 Chuyển máy về chế độ COMP ( MODE 1), (4) a) Tính giá trị gần đúng của biểu thức sau: Deg (MODE 1 ). Gán D = 0 (biến đếm) ; B = 0 ( biến tính tổng). 1 . ( : ghi bằng ALPHA : ) D! Ấn " = " liên tiếp đến khi D=20, ấn " = " ta được S1  B  1,718281828 .. Ghi vào màn hình : D = D+1 : B = B +. b) Tính gần đúng giá trị của biểu thức sau : 3 8 15 224 . S2     ................  5 10 17 226. Ta viết lại S2 dưới dạng sau : S2 . 22  1 32  1 42  1 152  1    ..................  22  1 32  1 42  1 152  1. Gán D=1 (biến đếm); B = 0 ( biến tổng). Ghi vào màn hình : D = D + 1 : B = B +. D2 1 . D2  1. Ấn " = " liên tiếp đến khi D=15, ấn " = ", ta được S2  B  12,97546126 . Thí dụ 2: Tính gần đúng giá trị các biểu thức sau : a) A1  20 20  19 19  18 18  ..............  3 3  2 Gán D=1 ( biến chạy ) ; B = 0 ( biến tổng ) . Ghi vào màn hình: D = D + 1 : B = D D  B . Ấn " = " liên tiếp để lặp, đến khi D=20, ấn " = ", ta được A1  B  1,164896671. 3. 3. 3. 3. 2   5   10  530   b) A2  1    3   5   ...........   45   . 2  3 4   3 4  5  23  24  25   1 2  3   . Gọi an là số hạng thứ n của tổng , khi đó an được xác định bởi : 3.   n2  1 an   2n  1   . Khi đó ta tính tổng A2 như sau : n(n  1)(n  2)  . Gán D = 0 ( biến đếm) ; B = 0 ( biến tổng ). 3.   D2  1 Ghi vào màn hình : D = D + 1 : B = B +  2 D  1   . D( D  1)( D  2)   13.

<span class='text_page_counter'>(14)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Các lo i máy tính s d ng đư c phương pháp l p như: Các lo i máy tính khoa h c VietnamCalculator t 570RS tr Casio t 570MS tr lên.. Máy tính khoa h c VietnamCalculator 570ES Plus. 991ES. lên,. 115ES. 991EX 14.

<span class='text_page_counter'>(15)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Ấn " = " liên tiếp để lặp, đến khi D=23, ấn "=" ta được A2  B  526,8948752 . Thí dụ 3: Lập trình trên máy tính nhanh giá trị của các biểu thức sau đây : a) S  1 . 15 . 14 2 13 3 12 4 11 5 10 6 9 7 8. Gán A=8 (biến đếm 1) ; B = 8 (biến đếm 2) ; C = 8 ( biến tổng). Ghi vào màn hình : A = A – 1 : B = B + 1 : C = C-1 × B + A. Ấn " = " liên tiếp để lặp, đến khi A = 1, B = 15 , ấn " = ", ta được C  4,205864882. 1 2. 1 1 2 3. 1 1 1 2 3 4. 1 1 2 3. b) S  1  . 3 1   . 4 1    ................100 1   ........ . 1 . 100. Gán D=1 ( biến đếm) ; A = 1 ( biến tổng) ; B = 0 (biến số hạng ) ; C = 1 (biến tích). Ghi vào màn hình : D = D + 1 : A = A +. 1 :B= D. D. A : C= CB.. Ấn " = " liên tiếp cho đến khi D =100, ấn = = = , ta được S = C  92,97094657. Thí dụ 4: Cho hàm số f ( x)  5x21  x19  6 x17 . Kí hiệu f ( n ) ( x) là đạo hàm cấp n của f ( x) . 17. Khi đó tính giá trị của tổng sau : S   f (i )  i  . i 1. Trước tiên ta nhắc lại một kiến thức cũ đã học để áp dụng vào bài này : Cho hàm số g ( x)  ax n . Khi đó ta có , với mọi k nguyên dương ta có : n!  .x n  k khi k  n a. g ( x)   (n  k )! . 0 khi k  n  (k ). Khi đó ta tính tổng trên như sau : Gán D = 0 (biến đếm) ; B = 0 (biến tổng). Ghi vào màn hình : D = D +1 : B = B – 5× 6. 21! 19!  D 21 D +  D19 D + (21  D)! (19  D)!. 17!  D17  D . (17  D)!. Ấn " = " liên tiếp để lặp, đến khi D =17 , ấn = ta được S = B  -2,394340358 1025 . Thí dụ 5: Cho hàm số f ( x)  4cos2 x  sin 2 x  5cosx . 20. Lập trình trên máy tính tồng sau : S   f (i ) (10i) . (tính bằng độ) i 1. Ta viết f ( x) lại thành f ( x)  2(1  cos2x) + sin2x - 5cosx = 2cos2x + sin2x - 5cosx + 2 . (n) n 0   cosu    u ' .cos(u+ n.90 ) Trước tiên ta nhớ lại công thức :  . (n) n 0 sin u  u ' .sin( u  n .90 )     . 15.

<span class='text_page_counter'>(16)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Khi đó đạo hàm cấp n của f ( x) được tính bởi. f ( n ) ( x)  2n1 cos  2x + n.900   2n.sin  2 x  n.900   5cos(x + n.900 ) .. Ta tính tồng S như sau : Gán D = 0 (biến đếm); B = 0 (biến tổng). Ghi vào màn hình : D = D + 1 : B = B + 2D1 cos  20D + D.900   2D.sin  20D  D.900   5cos(10D + D.900 ) . Ấn " = " liên tiếp để lặp, đến khi D=20, ấn "=" ta được S = B  1.838.217,784 Thí dụ 6: Tìm chữ só lẻ thập thập phân thứ 242010 của phép chia Trước tiên ta có :. 10052010 . 24. 10052010 3  205143  . 49 49. Ta sẽ đi tìm chu kì của phép chia 3÷49 bằng cách lập trình trên máy để làm cho việc tính toàn trở nên dễ dàng và nhanh nhất bằng 1 trong 2 cách sau : Lưu ý: cách này chỉ thực hiện được trên máy 570MS có khả năng nhớ được 12 chữ số thập phân sau dấu phẩy, không thực hiện được trên các máy khác. Cách 1: Gán A = 3 ; B = 49 . Ghi vào màn hình : (((A×E9 ÷ B + 0,5) × E(-11) +1 – 1 ) × E11 – 1 ) : A = A×E9 – AnsB. ( Phím E ghi bằng phím EXP (10^ )). Ấn "=" để lặp, mỗi lần ấn = ta được 9 số thập phân sau dấu phẩy của phép chia 3/49 theo thứ tự đó. Sau một số lần lặp ta được 3÷49=0,061224489795918367346938775510204081632653061224489795. ....... Ta tính được chu kì của phép chia là 42. Ta lại có : 245  12 (mod 42) 2410  18 (mod 42) 2420  30 (mod 42) 242000   2420 . 100.  30100   304   3025  30.  304  25. 6. ..  30.306  303.304  303.30  304  30 (mod 42) 242010  2410.242000  18.30  36 (mod 42). Vậ chữ số thập phân thứ 242010 sau dấu phẩy chính là chữ số thứ 36 của chu kì và số đó là 6. Cách 2: Vào chương trình tính cơ số BASE ( MODE MODE 3 ). Gán A=3, B = 49 . Lần lượt thực hiện các thao tác sau : Ghi vào màn hình : A×100000000 ÷ B (ta được 8 chữ số thập phân sau dấu phẩy), ấn tiếp A×100000000 - AnsB SHIFT STO A , Dùng  trên phím REPLAY để quay lại và thực hiện SHIFT COPY (REPLAY). Lúc đó trên màn hình hiển thị như sau : A×100000000 ÷ B : A×100000000 - AnsB  A. Ấn "=" để lặp, mỗi lần ấn dấu "=" ta lại được 8 chữ số sau chữ số thập phân sau dấu phẩy của phép chia 3/49 theo thứ tự trên. Bài tập dành cho các bạn tự luyện: Bài 1: Tính gần đúng giá trị của biểu thức sau : 3 2. 4 5 32  ................  . 5 10 901. a) S   . 16.

<span class='text_page_counter'>(17)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 4 7 10 91 b) S     .........  . 3 6 11 902. Bài 2: Tính gần đúng (làm tròn đến 5 chữ số thập phân) giá trị của biểu thức sau : M. 20. 2  3  18 4  ................  3 19  20 . 19. Bài 3: Tìm gần đúng nghiệm của phương trình sau: [A]x + A-1 = 2010 ( [A] phần nguyên của A) 1 2. Với A được cho bởi A  3  32  4. 2 3 37  43  5 3  54  ...............  39 37  3938 . 2 3 4 38. Bài 4: Tìm chữ số thập phân thứ 82010 sau dấu phẩy của phép chia 216 ÷ 43. Bài 5: Cho đa thức g ( x)  5x9  7 x7 . Tính gần đúng giá trị của biểu thức sau : S  g '(1)  g ''(1,1) g (3) (1, 01) ............... g (9) (1, 00... 1) . 3x 2  3x  74 Bài 6: Cho hàm số y  2 . Lập trình trên máy tính 570MS tính gần đúng x  4 x  12 tổng sau : S  y '(2)  y ''(5)  y (3) (10)  ..............  y (10) (101) .. Dạng 2: Tính toán trong các bài toán dãy số. u0  1; u1  3. . un  2  5un 1  6un , n   .. Thí dụ 1: Cho dãy số {un} được xác định bởi :  20. Tính giá trị của u20 và S20   ui . i 0. Gán D= 1 (biến đếm); A = 1 ; B = 3 (số hạng ) ; C= 4 (tổng). Ghi vào màn hình : D = D + 1: A = 5B – 6A : C = C +A : D = D + 1 : B = 5A – 6B : C= C + B. Ấn "=" liên tiếp đến khi D=20 thì ta được u20 = 3.486.784.401 và S20 = 5.230.176.601. u0  1; u1  2; u2  3. un 3  5un  2  3un 1  7un ,. Thí dụ 2: Cho dãy số {un} được xác định bởi : . n   .. 10. Tính giá trị của u15 và S10   ui . i 0. Gán D=2 (biến đếm); A = 1 ; B = 2 ; C = 3 (số hạng) ; E = 6 ( tổng). Ghi vào màn hình : D = D+1 : A = 5C – 3B + 7A : E = E + A : D = D+1 : B = 5A – 3C + 7B : E = E + B : D = D+1 : C = 5B – 3A + 7C : E = E + C. Ấn "=" liên tiếp ta xác định được các giá trị cần tính là : S10 = 1.125.466 và u15 = 1.983.638.868 . u1  1; v1  5. Thí dụ 3: Cho dãy {un} được xác định bởi : un1  3un  2vn , n  1. v  4v  u n n  n 1. Tính giá trị của u15 và v16. Cách 1: Ta lập dãy số truy hồi cho từng dãy số trên như sau :. 17. (*).

<span class='text_page_counter'>(18)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017 u1  1; u2  13; v  5; v  19; 2 Từ (*) ta có :  1 un  2  3un 1  2vn 1  3un 1  2  4vn  un  v  4v  u  4v  (3u  2v ) n 1 n 1 n 1 n n  n2 u1  1; u2  13  un  2  3un 1  2un  4  un 1  3un   7un 1  14un .  v  5; v  19 1 2  v  4v  2v  3  v  4v   7v  14v n 1 n n 1 n n 1 n  n2. Tới đây ta thực hiện tương tự như những ví dụ trên. Cách 2: Tính trực tiếp mà không qua biến đổi. Gán : E = 1 (biến đếm) ; A= 1 (số hạng un) ; B = 5 (số hạng vn). Ghi vào màn hình: E = E + 1 : C = 3A + 2B : D = 4B – A : E = E + 1 : A = 3C + 2D : B = 4D – C . Ấn "=" liên tiếp ta được u15 = -522.059.840 và v16 = -597.753.856  x1  x2  1 Thí dụ 4: Cho dãy số được xác định như sau:  xn21  2 x  , n  3.  n xn  2 . Lập trình trên máy tính để tính tổng 10 số hạng đầu tiên. Chứng minh tất cả các số hạng trên dãy để là số nguyên. Gán D = 2 (biến đếm) ; A = 1 ; B=1 (số hạng); C = 2 (tổng). Ghi vào màn hình : D=D+1: A= (B2 + 2) ÷ A : C = C + A : D = D + 1 : B = (A2 + 2) ÷ B : C = C + B. Ấn "=" liên tiếp đến khi D=10 thì ta được S10 = C = 40546. Phần chứng minh xin dành cho bạn đọc. Sau đây là một số bài tập dành cho các bạn tự luyện: u0  u1  1 . un  2  un 1  un , n   .. Bài 1: (Dãy Fibonacy). Cho  30. Tính số hạng u30 và S30   ui . i 0. u  3; u2  2; u3  5 Bài 2: Cho dãy {un} được xác định bởi :  1 2.  un 3  3un  2  2un 1  un  15 , n  . Tính tổng của 20 số hạng đầu tiên.  x1  1 Bài 3: Cho dãy số {xn} được xác định bởi :  3xn  2  xn 1  x  5 , n  1. n . Tim cách tính chính xác giá trị của x20 ? ( Gợi ý: chuyển về hai dãy phụ bằng cách đặt xn . yn ). zn. Dạng 3: DỰ ĐOÁN GIỚI HẠN CỦA DÃY SỐ.  x1  5. Thí dụ 1: Cho dãy số được xác định bởi : . 2  xn 1  xn  2 , n  1.. 18. ..

<span class='text_page_counter'>(19)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 xn 1 a) Xác định giá trị của xlim .  x x .....x 1 2 n. 1  1 1   .......  . x1 x2 ...xn   x1 x1 x2. b) Xác định nlim  . Giải: a) Gán A= 5 (số hạng) ; B=1 (biến tích). Ghi vào màn hình : B = BA : A = A2 – 2 : A ÷ B . Ấn " = " liên tiếp đến khi giá trị A ÷ B hiển thị trên màn hinh có giá trị không đổi và ta tìm được giá trị đó là : A ÷ B = 4,582575695 = 21 . Vậy xlim . xn 1  21 . x1 x2 .....xn. b) Gán A =5 (số hạng) ; B = 1 ( biến tích) ; D = 1/5 ( biến tổng). Ghi vào màn hình : A = A2 – 2 : B = BA : D = D + 1÷B . Ấn " = " liên tiếp đến khi B=0, và D không đổi, khi đó ta tính được D=0,208712152. Nếu giải tay ta được kết quả chính xác là : 1 1 1  5  21 lim    .......  0, 208712152.  n  x x1 x2... xn  2  1 x1 x2 u  1; u2  2 Thí dụ 2: Cho dãy số {un} được xác định như sau :  1 un  2  un 1  2un , n  1, 2,...... Tính gần đúng giới hạn sau : nlim . un 1 . un. Gán D=2 (biến đếm) ; A = 1 ; B = 2 (số hạng). Ghi vào màn hình : D = D + 1 : A = B + 2A : A ÷ B : D = D + 1 : B = A + 2B : B ÷ A . Ấn "=" đến khi A ÷ B hoặc B ÷ A đạt đến giá trị không đổi và ta tính được un1  2, 414213562 1 n  u n lim. 2.. Sau đây là một số bài tập dành cho các bạn tự luyện. u1  u2  1 Bài 1: Dãy {un} được xác định như sau :  2 2 2 un  2  5 un 1  5 sin un , n  1, 2,....... Tìm lim un . n . u0  2005 Bài 2: Dãy số {un} được xác định như sau :  . 1 un 1  un  u 2 , n   . n  3 un Tìm giới hạn sau : nlim .  n u1  1 Bài 3: Dãy số {un} được xác định như sau :  . un2 u  u  , n  1, 2,....  n 1 n 2005   u1 u2 u    ....  n  . Tính giới hạn sau đây : nlim   u un 1   2 u3 19.

<span class='text_page_counter'>(20)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Dạng 4: Tìm nghiệm gần đúng của phƣơng trình phƣơng trình phi tuyến bất kì.. Thí dụ 1: Tìm gần đúng hai nghiệm của phương trình sau : x10  5 x3  2 x  3  0 . Đặt f ( x)  x10  5x3  2x  3 . Ta có f ( x) là một số liên tục trên  . Ta có : f (1)  1; f (0)  3; f (1)  5; f (2)  985. Suy ra phương trình f ( x)  0 có ít nhất 1 nghiệm trong mỗi khoảng (-1;0) và (1; 2). Sử dụng quy trình lặp sau để tìm nghiệm ( Phương pháp Niutơn). xn 1  xn . f ( xn ) . f '( xn ). Gán X= -0.7, ghi vào màn hình : X = X –. X 10  5 X 3  2 X  3 . 10 X 9  15 X 2  2. Ấn "=" liên tiếp đến khi giá trị của X không thay đổi nữa thì đó chính là nghiệm của phương trình. Nghiệm thứ nhất X  -0,950804901. Tương tự gán X = 1,3 , thực hiện quy trình lặp trên ta được X  1,266601048. Một số bài tập dành cho bạn đọc tự luyện: Tìm nghiệm gần đúng của các phương trình sau đây : a ) 2 x 5  2cosx+1=0 b) x 2  s inx - 1 = 0 c) x 4  x 2  7 x  2  0 d )x  6 x 1  0 e). 3. .. x 2  3  3 x  19. f ) 2 x  3x  5 x  11x g ) x 9  x  10  0. 20.

<span class='text_page_counter'>(21)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Applied Mathematics, Technology and Education Journal – No 02, 07/2017. CÁC PHƯƠNG PHÁP SAI PHÂN HỮU HẠN CHO PHƯƠNG TRÌNH ĐẠO HÀM RIÊNG DẠNG. HYPERBOLIC Henry Tran Wayne State University, Michigan, USA. LỜI BAN BIÊN TẬP Bài viết của tác giả Henry Tran có nguyên bản là tiếng Anh, có ba phần chính gồm: • Lý thuyết và ứng dụng lập trình MATLAB trong phương trình Parabolic (xem tạp chí AMTEJ số 01) • Lý thuyết và ứng dụng lập trình MATLAB trong phương trình Hyperbolic. • Lý thuyết và ứng dụng lập trình MATLAB trong phương trình Elliptic. Ở số báo này, chúng tôi sẽ đăng tiếp phần hai, dạng Hyperbolic. Tóm tắt Chúng ta sẽ tiếp tục áp dụng hai phương pháp sai phân hữu hạn (Finite Difference Method) là: phương pháp tường minh (Explicit method) và phương pháp Crank-Nicolson (viết tắt là CNM) cho phương trình sai phân hữu hạn dạng Hyperbolic, nghĩa là ta lấy vi phân bậc hai cho biến theo thời gian t (trong phần 1 - dạng Parabolic, ta đã lấy vi phân bậc nhất cho biến theo thời gian t). Trong phần Hyperbolic này, chúng ta sẽ tìm hiểu các công thức tính toán cho các bài toán phương trình sóng một cách cụ thể với các chứng minh, từ đó xây dựng các thuật toán tìm nghiệm gần đúng cho ngôn ngữ lập trình MATLAB xử lí, cũng như cho bạn đọc thấy các quá trình tìm nghiệm thông qua các hình ảnh được hiển thị từ mỗi phương trình và quá trình đồ thị hóa.. 1. Các dạng toán Hyperbolic 21.

<span class='text_page_counter'>(22)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 1.1. Phương trình đạo hàm riêng dạng Hyperbolic Một phương trình đạo hàm riêng bậc hai có dạng a. ∂ 2u ∂ 2u ∂u ∂ 2u ∂u + c + e +f =0 + 2b + d ∂x2 ∂xy ∂y 2 ∂x ∂y. được gọi là bài toán hyperbolic nếu ma trận .  a b M= , b c thỏa mãn điều kiện det (M ) = ac − b2 < 0. Phương trình sóng là một dạng cơ bản của PDEs trong bài toán hyperbolic của không gian một chiều với a = 1.. 1.2. Bài toán mô hình phương trình sóng Phương trình sóng được viết dưới dạng ∂2 ∂2 u (x, t) = u (x, t) ∂t2 ∂x2 Chúng ta có thể viết lại thành 1 1 [u (x + h, t) − 2u (x, t) + u (x − h, t)] = 2 [u (x, t + k) − 2u (x, t) + u (x, t − k)] 2 h k Ta cũng có công thức u (x, t + k) = ρu (x + h, t) + 2 (1 − ρ) u (x, t) + ρu (x − h, t) − u (x, t − k) (∗) .. Điều kiện ổn định ở đây là ρ =. k2 h2. ≤ 1.. 22.

<span class='text_page_counter'>(23)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Phương trình sóng và các điều kiện ban đầu là  ∂2 ∂2 u (x, t) = ∂x  2 u (x, t)   ∂t2 u (x, 0) = f (x) ut (x, 0) = 0    u (0, t) = u (1, t) = 0. trong đó 0 ≤ x ≤ 1 and 0 ≤ t. Nhắc lại rằng ut (x, t) =. 1 k. [u (x, t + k) − u (x, t)] .. Từ t = 0, ta có. 1 [u (x, k) − u (x, 0)] . k Do đó, ta cũng có hệ phương trình tương tự  ∂2 ∂2  2 u (x, t) = ∂x2 u (x, t)  ∂t  u (x, 0) = f (x) 1 [u (x, k) − u (x, 0)] = 0   k u (0, t) = u (1, t) = 0 ut (x, 0) =. với 0 ≤ x ≤ 1 and 0 ≤ t.. Từ phương trình của điều kiện ban đầu với điều kiện đầu tiên của ut (x, 0) = 0 là 1 [u (x, k) − u (x, 0)] = 0, k chúng ta có thể kết luận điều kiện đầu tiên của u (x, k) = u (x, 0) = f (x). Thay t = 0 trong (∗), ta được u (x, k) = ρu (x + h, 0) + 2 (1 − ρ) u (x, 0) + ρu (x − h, 0) − u (x, −k) . Sử dụng xấp xỉ sai số trung tâm, ta có 1 [u (x, k) − u (x, −k)] = 0. 2k Do đó, ta có điều kiện thứ hai của hệ điều kiện biên của (x, k) là 1 u (x, k) = ρ [f (x + h) + f (x − h)] + (1 − ρ) f (x) . 2. 23.

<span class='text_page_counter'>(24)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 1.3. Công thức tường minh 1.3.1. Phương pháp tường minh sử dụng công thức Từ phương trình ban đầu, bằng việc dùng biến h, k lần lượt ký hiệu cho số gia của các biến x, t, chúng ta có 1 1 [u (x + h, t) − 2u (x, t) + u (x − h, t)] = [u (x, t + k) − 2u (x, t) + u (x, t − k)] . h2 k2 Nó cũng có thể viết thành dạng u (x, t + k) = ρu (x + h, t) + 2 (1 − ρ) u (x, t) + ρu (x − h, t) − u (x, t − k) . Ở đây, điều kiện ổn định là ρ =. k2 h2. ≤ 1.. Chúng ta có năm điểm được biểu diễn ở lược đồ sau. 1.3.2. Giải phương trình sóng và lập trình tính toán a) Ví dụ Chúng ta có hệ phương trình    . ∂2 u (x, t) ∂t2. 2. ∂ = ∂x 2 u (x, t) u (x, 0) = f (x) 1 [u (x, k) − u (x, 0)] = 0   k u (0, t) = u (1, t) = 0. Sử dụng phần mềm MATLAB để giải với. f (x) = sin2πx, T = 1, L = 1, , nt = 200, nx = 32. 24.

<span class='text_page_counter'>(25)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Điều kiện ban đầu là u (0, t) = u (1, t) = 0 và 1 [u (x, k) − u (x, 0)] = 0 k hay. 1 u (x, k) = ρ [f (x + h) + f (x − h)] + (1 − ρ) f (x) 2 b) Lập trình tính toán (xem thêm phần Phụ lục bên dưới) Nghiệm chính xác là uexact (x, t) =. 1 [sin2π (x + t) + sin2π (x − t)] tại T = 1. 2. Chúng ta có các kết quả về nghiệm xấp xỉ bởi phương pháp sai phân hữu hạn và nghiệm chính xác với T = 1 trong các hình minh họa. Trong 2D: với T = 1, L = 1, nt = 200, nx = 8, 16, 32, 64.. 25.

<span class='text_page_counter'>(26)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 26.

<span class='text_page_counter'>(27)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. So sánh giữa phương pháp sai phân hữu hạn và nghiệm chính xác. Minh họa của nghiệm gần đúng bởi phương pháp tường minh với T = 1. 27.

<span class='text_page_counter'>(28)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Minh họa của nghiệm chính xác với T = 1. 28.

<span class='text_page_counter'>(29)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Bằng cách tính các sai số giữa nghiệm gần đúng và nghiệm chính xác, ta có bảng sai số của giữa nghiệm chính xác và nghiệm gần đúng như sau (phần lí thuyết và các công thức tìm sai số, vui lòng xem bài trong phần 1 - dạng Parabolic):. 2. Kết luận Phương pháp sai phân hữu hạn cho PDEs của bài toán hyperbolic với dạng đơn giản nhất là 2 phương trình sóng của một chiều. Giá trị của h và k thỏa mãn điều kiện ổn định là ρ = hk2 ≤ 1. Điều này có nghĩa là nx ≥ nT và ta cần chọn giá trị thích hợp cho nT và nx trong chương trình MATLAB. Nghiệm hội tụ khi ta cố định giá trị của nT nhưng thay đổi giá trị của nx. Chúng ta cũng thấy rằng nếu chọn nx ≥ nT thì đồ thị sẽ không còn đúng dạng nữa. Chúng ta đã tính được sai số giữa nghiệm chính xác và nghiệm gần đúng bởi các giá trị khác nhau của nx. Điều này chứng tỏ rằng bậc hội tụ là 1. Thông qua bảng hội tụ, ta đã vẽ được đồ thị để so sánh các giá trị của nghiệm chính xác và nghiệm gần đúng trên cùng một hệ trục tọa độ. Cuối cùng, ta cũng đã thể hiện được đồ thị của hàm số đã chọn trong không gian ba chiều. Lý thuyết về bài toán dạng hyperbolic có nhiều mô hình từ đơn giản đến phức tạp trong Toán học, chẳng hạn như phương trình đối lưu, Lax, Upwind, Lax-Wendroff, phương trình NavierStokes. Thêm nữa, bài toán này trong những năm gần đây cũng được nghiên cứu và phát triển phục vụ cho khoa học và kỹ thuật. Phương trình sóng có nhiều ứng dụng trong vật lý như các sóng của chuỗi, sóng giật trong không khí, sóng cơ học lượng tử, các mô hình âm thanh của sóng địa chấn, sóng âm trong chất lỏng và gas, v.v.. 3. Lập trình MATLAB dạng Hyperbolic MATLAB program: Bài toán mô hình phương trình sóng 29.

<span class='text_page_counter'>(30)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. function hyperfdm_sol(L,T,nT,nx) % Matlab Program : Hyperbolic problems: %Wave equation: u_xx=u_tt %where u(x,0)=sin(pi*x). Use the explicit method. %The exact solution: u_exact=(1/2)*(sin(2*pi*(x+t))+sin(2*pi*(x-t))) %L = 1.; % Length of the wire %T = 1; % Final time % Choose nT= 200. Number of time steps dt = T/nT; % Choose nx= 4,8,... Number of space steps dx = L/nx; rho = dt^2/(dx^2); % Stability parameter rho <= 1 when nx <= nT. % Initial temperature of the wire % initilalize u u = zeros(nx+1,nT+1); u3 = zeros(nx+1,nT+1); x = zeros(nx+1,1); time = zeros(nT+1,1); for i = 1:nx+1 x(i) = (i-1)*dx; u(i,1) = f0(x(i)); end %Temperature at the boundary (t=0) for k =1:nT+1 u(1,k) = 0.; u(nx+1,k) = 0.; time(k) = (k-1)*dt; end %Implementation of the exact solution for k=1:nT+1 for i = 1:nx+1 u3(i,k) = u_exact(x(i),time(k)); end end %Implementation of the explicit method for i = 2:nx %k=2, the first time step u(i,2) = (1/2)*rho*(f0(x(i+1))+f0(x(i-1)))+(1-rho)*f0(x(i)); end % The second time step for k = 3:nT+1 % Time Loop for i = 2:nx % Space Loop u(i,k) = rho*u(i+1,k-1)+2*(1-rho)*u(i,k-1)+ rho*u(i-1,k-1)-u(i,k-2); end end disp(error2); % Graphical representation of the temperature at different selected. 30.

<span class='text_page_counter'>(31)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 times figure hold on %The graphic of the exact solution in 2D plot(x,u3(:,1),’-r’,’MarkerFaceColor’,’r’) %The graphic of the explicit method in 2D plot(x,u(:,1),’*b’,’MarkerFaceColor’,’b’) xlabel(’x’) ylabel(’temperature’) legend({’Exact solutions’ ’Finite difference method’},’location’,’NE’); title(’The comparison of the finite difference method and the exact solutions for h = 1/64, at T=1’) hold off %The graphic of the explicit method in 3D figure mesh(x,time,u’) title(’The the finite difference method for h = 1/32,at T=1’) xlabel(’x’) ylabel(’time’) zlabel(’Temperature’) %The graphic of the exact solution in 3D figure mesh(x,time,u3’) title(’The exact solutions for h=1/32,at T=1’) xlabel(’x’) ylabel(’time’) zlabel(’Temperature’). Trong đó, ta dùng chương trình con để tính u0: function u = u_exact(x) % Initial Condition u =sin(2*pi*x);. Tính nghiệm chính xác ue xact(x) function u3 = u_exact(x,t) % The exact solution u3 =(1/2)*(sin(2*pi*(x+t))+sin(2*pi*(x-t)));. 31.

<span class='text_page_counter'>(32)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Tài liệu [1] W. Cheney., D. Kincaid. 2008. Numerical Mathematics and Computing, Sixth edition. Belmont. CA: Thomson, 582-624. [2] E.K.P. Chong, S.H. Zak., 2001. An Introduction to Optimization, Second edition. New York: John Wiley & Sons, Inc. [3] R. J. Lopez. 2001. Advanced Engineering Mathematics. Addison Wesley. [4] G.E. Forsythe., W.R.Wasow.1960. Finite Difference Methods for Partial Differential Equations. New York: John Wiley & Sons, Inc. [5] G.F.D. Duff., D. Naylor. 1966. Differential Equations of Applied Mathematics. New York: John Wiley & Sons, Inc. [6] G.F.D. Duff., D. Naylor. 1966. Differential Equations of Applied Mathematics. New York: John Wiley & Sons, Inc. [7] R. J. LeVeque.2007. Finite Difference Methods for Ordinary and Partial Differential Equations. Philadelphia: SIAM. [8] E.D. Rainville., P.E. Bedient., R.E. Bedient. 1997. Elementary Differential Equations, Eight edition. New Jersey: Prentice Hall. Inc. [9] S.C. Chapra., 2012. Applied Numerical Methods with Matlab for Engineers and Scientists, Third edition. New York: McGraw-Hill. [10] P.D.Lax., Hyperbolic Systems of Conservation Laws and the Mathematical Theoryof Shock Waves. Society for Industrial and Applied Mathematics, Philadelphia, 1973. ,October 8. [11] B.L.Keyfitz., Self-similar solutions of two-dimensional conservation laws. Journal of Hyperbolic Differential Equations, 2004. [12] W. Boyce and R.D. Prima., Elementary Differential Equations and Boundary Value Problems. John Wiley & Sons Ltd., Hoboken, N.J., Eight edition, 2005. [13] L.C. Evans. , Partial Differential Equations, volume 19 of Graduate Studies in Mathematics. American Mathematical Society, Providence, RI, Second edition, 2010. [14] R. Haberman., Applied Partial Differential Equations. Prentice Hall Inc., Upper Saddle River, N.J., Fourth edition, 2004. [15] T. Myint-U, L. Debnath., Linear Partial Differential Equations for Scientists and Engineers. Birkhauser Boston Inc., Boston, MA, Fourth edition, 2007. [16] F. John., Partial Differential Equations, volume 1 of Applied Mathematica Sciences. Springer-Verlag, New York, Fourth edition, 1982. 32.

<span class='text_page_counter'>(33)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. [17] M. A. Pinsky. Partial Differential Equations and Boundary Value Problems with Applications. Waveland Press Inc., Prospect Heights, Illinois, Third edition, 2003. [18] I. P. Stavroulakis, S. A. Tersian. Partial Differential Equations. World Scientific Publishing Co. Inc., River Edge, NJ, second edition, 2004. An introduction with Mathematica and MAPLE. [19] W. A. Strauss. Partial Differential Equations. John Wiley & Sons Ltd., Chichester, Second edition, 2008. [20] S.Attaway., MATLAB: A Practical Introduction to Programming and Problem Solving, Elsevier Science, Burlington, MA, 2009. [21] D. Hanselma , B. Littlefield., Mastering MATLAB 7, Prentice Hall, Upper Saddle River, NJ, 2005. [22] C. B. Moler., Numerical Computing with MATLAB, SIAM, Philadelphia, 2004. [23] W. J. Palm, A Concise Introduction to MATLAB, McGraw-Hill, New York, 2007.. 33.

<span class='text_page_counter'>(34)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. The Riemann Hypothesis J. Brian Conrey The American Institute of Mathematics, USA L I BAN BIÊN T P Gi thi t Riemann là m t trong b y bài toán thiên niên k , và hi n nay v n chưa có l i gi i. Vi n Toán h c Clay, M đã treo gi i thư ng m t tri u USD cho b t k ai gi i đư c bài toán này. Bài vi t bên dư i c a tác gi J. Brian Conrey cho chúng ta cái nhìn t ng quan v gi thi t hóc búa trên.. ilbert, in his 1900 address to the Paris International Congress of Mathematicians, listed the Riemann Hypothesis as one of his 23 problems for mathematicians of the twentieth century to work on. Now we find it is up to twenty-first century mathematicians! The Riemann Hypothesis (RH) has been around for more than 140 years, and yet now is arguably the most exciting time in its history to be working on RH. Recent years have seen an explosion of research stemming from the confluence of several areas of mathematics and physics. In the past six years the American Institute of Mathematics (AIM) has sponsored three workshops whose focus has been RH. The first (RHI) was in Seattle in August 1996 at the University of Washington. The second (RHII) was in Vienna in October 1998 at the Erwin Schrödinger Institute, and the third (RHIII) was in New York in May 2002 at the Courant Institute of Mathematical Sciences. The intent of these workshops was to stimulate thinking and discussion about one of the most challenging problems of mathematics and to consider many different approaches. Are we any closer to solving the Riemann Hypothesis after these efforts? Possibly. Have we learned anything about the zeta-function as a result of these workshops? Definitely. Several of the participants from the workshops are collaborating on the website (http://. www.aimath.org/WWN/rh/) which provides an overview of the subject. Here I hope to outline some of the approaches to RH and to convey some of the excitement of working in this area at the present moment. To begin, let us examine the Riemann Hypothesis itself. In 1859 in the seminal paper “Ueber die Anzahl der Primzahlen unter eine gegebener Grösse”, G. B. F. Riemann outlined the basic analytic properties of the zeta-function ∞  1 1 1 ζ(s) := 1 + s + s + · · · = . s 2 3 n n=1. J. Brian Conrey is director of the American Institute of Mathematics. His email address is 1 Figure 1. ζ( 2 + it) for 0 < t < 50 .. H. MARCH 2003. The series converges in the half-plane where the real part of s is larger than 1 . Riemann proved that ζ(s) has an analytic continuation to the whole plane apart from a simple pole at s = 1 . Moreover, he proved that ζ(s) satisfies an amazing functional equation, which in its symmetric form is given by. 2 1. -1. 1. 2. -1 -2. NOTICES. OF THE. 34. AMS. 3.

<span class='text_page_counter'>(35)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 106 106. 106. 105. 105. 105. 104. 104. 104. 103. 103 103. 102. 102 102. 101. 101. 100 99. 0.4 0.6 0.8 1 1.2 1.4. 101. 100. 100. 99. 0.4 0.6 0.8 Figure 2. Contour plot of. ζ(s) , the curves. 0.4 0.6 0.8 1 1.2 1.4. 1.2 1.4. ζ(s) = 0 (solid) and ζ(s) = 0 (dotted), contour plot of ζ(s) .. Figure 3. 3-D plot of | ζ(s)|, and the curves ζ(s) = 0 (solid) and ζ(s) = 0 (dotted). This may be the first place in the critical strip where the curves ζ(s) = 0 loop around each other.   s s is an analytic version of the fundamental theorem ξ(s) := 12 s(s − 1)π − 2 Γ ζ(s) = ξ(1 − s), of arithmetic, which states that every integer can 2 be factored into primes in a unique way. Euler used where Γ (s) is the usual Gamma-function. this product to prove that the sum of the reciproThe zeta-function had been studied previously cals of the primes diverges. The Euler product sugby Euler and others, but only as a function of a real gests Riemann’s interest in the zeta-function: he variable. In particular, Euler noticed that was trying to prove a conjecture made by Legendre   and, in a more precise form, by Gauss: 1 1 1 x ζ(s) = 1 + s + s + s + . . . dt 2 4 8 π (x) := #{primes less than x} ∼ .    2 log t 1 1 1 × 1 + s + s + ... 1 + s + ... ... Riemann made great progress toward proving 3 9 5  −1 Gauss’s conjecture. He realized that the distribu 1 tion of the prime numbers depends on the distri= 1− s , p bution of the complex zeros of the zeta-function. p The Euler product implies that there are no zeros where the infinite product (called the Euler prodof ζ(s) with real part greater than 1 ; the functional uct) is over all the prime numbers. The product conequation implies that there are no zeros with real verges when the real part of s is greater than 1 . It part less than 0 , apart from the trivial zeros at NOTICES. OF THE. 35. AMS. VOLUME 50, NUMBER 3.

<span class='text_page_counter'>(36)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. s = −2, −4, −6, . . . . Thus, all of the complex zeros are in the critical strip 0 ≤ s ≤ 1 . Riemann gave an explicit formula for π (x) in terms of the complex zeros ρ = β + iγ of ζ(s) . A simpler variant of his formula is  ψ(x) := Λ(n) n≤x. =x−.  xρ ρ. ρ. − log 2π −. 1 2. log(1 − x−2 ),. valid for x not a prime power, where the von Mangoldt function Λ(n) = log p if n = pk for some k and Λ(n) = 0 otherwise. Note that the sum is not absolutely convergent; if it were, then n≤x Λ(n) would have to be a continuous function of x , which it clearly is not. Consequently, there must be infinitely many zeros ρ. The sum over ρ is with multiplicity and is to be interpreted as limT →∞ |ρ|<T . Note also that |xρ | = xβ ; thus it was necessary to show that β < 1 in order to conclude that n≤x Λ(n) ∼ x , which is a restatement of Gauss’s conjecture.. and then made his conjecture that all of the zeros of ζ(s) in fact lie on the 1/2 -line; this is the Riemann Hypothesis. Riemann’s effort came close to proving Gauss’s conjecture. The final step was left to Hadamard and de la Vallée Poussin, who proved independently in 1896 that ζ(s) does not vanish when the real part of s is equal to 1 and from that fact deduced Gauss’s conjecture, now called the Prime Number Theorem.. Initial Ideas It is not difficult to show that RH is equivalent to the assertion that for every  > 0 , x dt π (x) = + O(x1/2+ ). 2 log t However, it is difficult to see another way to approach π (x) and so get information about the zeros. Another easy equivalent to RH is the assertion that M(x) = O(x1/2+ ) for every  > 0 , where  M(x) = µ(n) n≤x. and µ(n) is the Möbius function whose definition can be inferred from its generating Dirichlet series 1/ζ :   ∞  1 µ(n)  1 = = 1− s . ζ(s) n=1 ns p p. Figure 4. Explicit formula for ψ(x) using the first 100 pairs of zeros. The functional equation shows that the complex 1 zeros are symmetric with respect to the line s = 2. Riemann calculated the first few complex zeros 1 + i14.134 . . . , 21 + i21.022 . . . and proved that the 2 number N(T ) of zeros with imaginary parts between 0 and T is T T 7 N(T ) = log + + S(T ) + O(1/T ), 2π 2π e 8 1 where S(T ) = π arg ζ(1/2 + iT ) is computed by continuous variation starting from arg ζ(2) = 0 and proceeding along straight lines, first up to 2 + iT and then to 1/2 + iT. Riemann also proved that S(T ) = O(log T ) . Note for future reference that at a height T the average gap between zero heights is ∼ 2π / log T. Riemann suggested that the number N0 (T ) of zeros of ζ(1/2 + it) with 0 < t ≤ T seemed to be about. T T log 2π 2π e MARCH 2003. Thus, if p1 , . . . , pk are distinct primes, then µ(p1 . . . pk ) = (−1)k ; also µ(n) = 0 if p2 | n for some prime p. This series converges absolutely when s > 1 . If the estimate M(x) = O(x1/2+ ) holds for every  > 0 , then it follows by partial summation that the series converges for every s with real part greater than 1/2; in particular, there can be no zeros of ζ(s) in this open half-plane, because zeros of ζ(s) are poles of 1/ζ(s) . The converse, that RH implies this estimate for M(x) , is also not difficult to show. Instead of analyzing π (x) directly, it might seem easier to work with M(x) and prove the above estimate, perhaps by some kind of combinatorial reasoning. In fact, Stieltjes let it be known that he had such a proof. Hadamard, in his famous 1896 proof of the Prime Number Theorem, refers to Stieltjes’s claim and somewhat apologetically offers his much weaker theorem that ζ(s) does not vanish on the 1 -line in the hope that the simplicity of his proof will be useful. Stieltjes never published his proof. Mertens made the stronger conjecture that √ |M(x)| ≤ x; clearly this implies RH. However, Mertens’s conjecture was disproved by Odlyzko and te Riele in √ 1985. The estimate M(x) = O( x ) is also likely to. NOTICES. OF THE. 36. AMS.

<span class='text_page_counter'>(37)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Figure 5. 1/|ζ(x + iy)| for 0 < x < 1 and 16502.4 < y < 16505 . be false, but a proof of its falsity has not yet been found.. Subsequent Efforts In England in the early 1900s the difficulty of the question was not yet appreciated. Barnes assigned RH to Littlewood as a thesis problem. Littlewood independently discovered some of the developments that had already occurred on the continent. Hardy, Littlewood, Ingham, and other British mathematicians were responsible for many of the results on the zeta-function in the first quarter of the century. Hardy and Littlewood gave the first proof that infinitely many of the zeros are on the 1/2 line. They found what they called the approximate functional equation for ζ(s) . Later, Siegel uncovered a very precise version of this formula while studying Riemann’s notes in the Göttingen library; the formula is now called the Riemann-Siegel formula and gives the starting point for all large-scale calculations of ζ(s) . Hardy and Littlewood gave an asymptotic evaluation of the second moment of ζ( 12 + it); Ingham proved the asymptotics for the fourth moment. Much effort has also been expended on the unproved Lindelöf hypothesis, which is a consequence of RH. The Lindelöf hypothesis asserts that for every  > 0 ,. ζ(1/2 + it) = O(t  ). as t → ∞.. Hardy and Littlewood proved that ζ(1/2 + it) = O(t 1/4+ ) . This bound is now called the “convexity bound”, since it follows from the functional equation together with general principles of complex analysis (the maximum modulus principle in the form of the Phragmén-Lindelöf theorem). Weyl improved the bound to t 1/6+ with his new ideas for estimating special trigonometrical sums, now called Weyl sums. Hardy grew to love the problem. He and Littlewood wrote at least ten papers on the zetafunction. Hardy once included proving RH on a list of New Year’s goals he set for himself. Hardy NOTICES. OF THE. 37. even used RH as a defense: he once sent a postcard to his colleague Harald Bohr prior to crossing the English Channel one stormy night, claiming that he had solved RH. Even though Hardy was an atheist, he was relatively certain that God, if he did exist, would not allow the ferry to sink under circumstances so favorable to Hardy! Hilbert seems to have had somewhat contradictory views about the difficulty of RH. On one occasion he compared √three unsolved problems: the transcendence of 2 2, Fermat’s Last Theorem, and the Riemann Hypothesis. In his view, RH would likely be solved in a few years, Fermat’s Last Theorem possibly in his lifetime, and the transcendence question possibly never. Amazingly, the transcendence question was resolved a few years later by Gelfond and Schneider, and, of course, Andrew Wiles recently proved Fermat’s Last Theorem. Another time Hilbert remarked that if he were to awake after a sleep of five hundred years, the first question he would ask was whether RH was solved. Near the end of his career, Hans Rademacher, best known for his exact formula for the number of partitions of an integer, thought he had disproved RH. Siegel had checked the work, which was based on the deduction that a certain function would absurdly have an analytic continuation if RH were true. The mathematics community tried to get Time magazine interested in the story. It transpired that Time became interested and published an article only after it was discovered that Rademacher’s proof was incorrect.. Evidence for RH Here are some reasons to believe RH. • Billions of zeros cannot be wrong. Recent work by van de Lune has shown that the first 10 billion zeros are on the line. Also, there is a distributed computing project organized by Sebastian Wedeniwski—a screen-saver type of program—that many people subscribe to, which claims to have verified that the first 100 billion zeros are on the line. Andrew Odlyzko has calculated millions of zeros near zeros number 1020 , 1021 , and 1022 (available on his website). • Almost all of the zeros are very near the 1/2 line. In fact, it has been proved that more than 99 percent of zeros ρ = β + iγ satisfy |β − 12 | ≤ 8/ log |γ| . • Many zeros can be proved to be on the line. Selberg got a positive proportion, and N. Levinson showed at least 1/3 ; that proportion has been improved to 40 percent. Also, RH implies that all zeros of all derivatives of ξ(s) are on the 1/2 -line. It has been shown that more than 99 percent of the zeros of the third derivative ξ  (s) are on the 1/2 -line. Near the end of his life, Levinson thought he had a method that allowed for a converse to Rolle’s theorem in. AMS. VOLUME 50, NUMBER 3.

<span class='text_page_counter'>(38)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. this situation, implying that if ξ  (s) has at least a certain proportion of zeros on the line, then so does ξ and similarly for ξ  to ξ  and so on. However, no one has been able to make this argument work. • Probabilistic arguments. For almost all random sequences of −1 ’s and +1 ’s, the associated summatory function up to x is bounded by x1/2+ . The Möbius sequence appears to be fairly random. • Symmetry of the primes. RH tells us that the primes are distributed in as nice a way as possible. If RH were false, there would be some strange irregularities in the distribution of primes; the first zero off the line would be a very important mathematical constant. It seems unlikely that nature is that perverse!. Various Approaches. Pólya’s Analysis Pólya investigated a chain of ideas that began with Riemann: namely, studying the Fourier transform 1 of Ξ(t) := ξ( 2 + it) , which as a consequence of the functional equation is real for real t and an even function of t . RH is the assertion that all zeros of Ξ are real. The Fourier transform can be computed explicitly: ∞ Φ(t) := Ξ(u)eitu du −∞. =. 9t 5t − 3 cosh 2 2 × exp(−2π cosh 2t). φ(t) = 2π cosh. to Φ(t) are real. These ideas have been further explored by de Bruijn, Newman, D. Hejhal, and others. Hejhal (1990) has shown that almost all of the zeros of the Fourier transform of any partial sum of Φ(t) are real. Probabilistic Models Researchers working in probability are intrigued by the fact that the ξ -function arises as an expectation in a moment of a Brownian bridge:. 2ξ(s) = E(Y s ) where. There is an often-told story that Hilbert and Pólya independently suggested that the way to prove RH was to interpret the zeros spectrally, that is, to find a naturally occurring Hermitian operator whose eigenvalues are the nontrivial zeros of ζ(1/2 + it) . Then RH would follow, since Hermitian operators have real eigenvalues. This idea has been one of the main approaches that has been tried repeatedly. We describe an assortment of other interesting approaches to RH.. ∞ . In particular, all the zeros of the Fourier transform of a first approximation (see Titchmarsh for details). .  max bt − min bt. t∈[0,1]. t∈[0,1]. with bt = βt − tβ1 where βt is standard Brownian motion. See a paper of Biane, Pitman, and Yor (Bull. Amer. Math. Soc. (N.S.) 38 (2001), 435–65). Functional Analysis: The Nyman-Beurling Approach This approach begins with the following theorem of Nyman, a student of Beurling. RH holds if and only if. spanL2 (0,1) {ηα , 0 < α < 1} = L2 (0, 1) where. ηα (t) = {α/t} − α{1/t} and {x} = x − [x] is the fractional part of x . This has been extended by Baez-Duarte, who showed that one may restrict attention to integral values of 1/α . Balazard and Saias have rephrased this in a nice way: RH holds if and only if ∞  2 1 − A( 12 + it)ζ( 12 + it) inf. (2n4 π 2 exp(9t/2) − 3n2 π exp(5t/2)). n=1. × exp −π n2 e2t .. A. It can be shown that Φ and Φ are positive for positive t . One idea is to systematically study classes of reasonable functions whose Fourier transforms have all real zeros and then try to prove that Ξ(t) is in the class. A sample theorem in this direction is due to de Bruijn: Let f (t) be an even nonconstant entire function of t such that f (t) ≥ 0 for real t and f  (t) = exp(γt 2 )g(t) , where γ ≥ 0 and g(t) is an entire function of genus ≤ 1 with purely imaginary ∞ zeros only. Then Ψ (z) = −∞ exp {−f (t)}eizt dt has real zeros only. MARCH 2003. Y :=. 2 π. −∞. dt 1 4. + t2. = 0,. where the infimum is over all Dirichlet polynomials A . Let dN be the infimum over all Dirichlet polynomials N  A(s) = an n−s n=1. of length N . They conjecture that dN ∼ C/ log N , where C = ρ 1/|ρ|2 . Burnol has proved that  mρ2 1 dn ≥ , log N ρ on the line |ρ|2. NOTICES. OF THE. 38. AMS.

<span class='text_page_counter'>(39)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Figure 6. Duality: The Fourier transform of the error term in the Prime Number Theorem (note the spikes at ordinates of zeros) and the sum over zeros − xρ with |ρ| < 100 (note the peaks at primes and prime powers). where mρ is the multiplicity of the zero ρ. If RH holds and all the zeros are simple, then clearly these two bounds are the same. Weil’s Explicit Formula and Positivity Criterion André Weil proved the following formula, which is a generalization of Riemann’s formula mentioned above and which specifically illustrates the dependence between primes and zeros. Suppose h is an even function that is holomorphic in the strip | t| ≤ 1/2 + δ and that satisfies h(t) = O((1 + |t|)−2−δ ) for some δ > 0 , and let  1 ∞ g(u) = h(r )e−iur dr . 2π −∞ Then we have the following duality between primes and zeros of ζ :  h(γ) =2h( 2i ) − g(0) log π γ.  1 ∞ Γ h(r ) ( 14 + 12 ir ) dr 2π −∞ Γ ∞  Λ(n) √ g(log n). −2 n n=1 +. In this formula, a zero is written as ρ = 1/2 + iγ where γ ∈ C ; of course RH is the assertion that every γ is real. Using this duality Weil gave a criterion for RH:. λn =.  (1 − (1 − 1/ρ)n ). ρ. As usual, the sum over zeros is limT →∞ Another expression for λn is  1 d n n−1 λn = (s log ξ(s)) . (n − 1)! ds n s=1. |ρ|<T .. It would be interesting to find an interpretation (geometric?) for these λn, or perhaps those associated with a different L-function, to make their positivity transparent. Selberg’s Trace Formula Selberg, perhaps looking for a spectral interpretation of the zeros of ζ(s) , proved a trace formula for the Laplace operator acting on the space of real-analytic functions defined on the upper halfplane H = {x + iy : y > 0} and invariant under the group SL(2, Z) of linear fractional transformations with integer entries and determinant one, which acts discontinuously on H . This invariance is expressed as   az + b = f (z); f cz + d the Laplace operator in this case is   ∂2 ∂2 2 ∆ = −y + . ∂x2 ∂x2. RH holds if and only if  h(γ) > 0 γ. for every (admissible) function h of the form h(r ) = h0 (r )h0 (r ) . Xian-Jin Li has given a very nice criterion which, in effect, says that one may restrict attention to a specific sequence hn : The Riemann Hypothesis is true if and only if λn ≥ 0 for each n = 1, 2, . . . where NOTICES. OF THE. 39. The spectrum of ∆ splits into a continuous part and a discrete part. The eigenvalues λ are all positive and, by convention, are usually expressed as λ = s(1 − s) . The continuous part consists of all s = 1/2 + it , t ≥ 0 , and we write the discrete part 1 as sj = 2 + irj . Then. AMS. VOLUME 50, NUMBER 3.

<span class='text_page_counter'>(40)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Figure 7. The eigenvalues of a random 40 x 40 unitary matrix, 40 consecutive zeros of ζ(s) scaled to wrap once around the circle, and 40 randomly chosen points on the unit circle. ∞ . h(rj ) = − h(0) − g(0) log. π 2. −. j=1. +2 +. 1 2π. ∞ −∞. h(r )G(r ) dr. ∞ . Λ(n) g(2 log n) n n=1. ∞  g(: log P ) log P P :/2 − P −:/2 P :=1. where g , h, and Λ are as in Weil’s formula and. G(r ) =. Γ 1 Γ π ( 2 + ir ) + (1 + ir ) − r tanh π r Γ Γ 6 √ π 1 3 πr + ( + 9 cosh 3 ). cosh π r 8. The final sum is over the norms P of prime geodesics of SL(2, Z)\H√ . The values taken on by P are of the form (n + n2 − 4 )2 /4 , n ≥ 3 , with certain multiplicities (the class number h(n2 − 4) ). H. Haas was one of the first people to compute the eigenvalues r1 = 9.533 . . . , r2 = 12.173 . . . , r3 = 13.779 . . . of SL(2, Z) in 1977 in his University of Heidelberg Diplomarbeit. Soon after, Hejhal was visiting San Diego, and Audrey Terras pointed out to him that Haas’s list contained the numbers 14.134 . . . , 21.022 . . . : the ordinates of the first few zeros of ζ(s) were lurking amongst the eigenvalues! Hejhal discovered the ordinates of the zeros of L(s, χ3 ) (see section 7) on the list too. He unraveled this perplexing mystery about six months later. It turned out that the spurious eigenvalues were associated to “pseudo cusp forms” and appeared because of the method of computation used. If the zeros had appeared legitimately, RH would have followed because λ = ρ(1 − ρ) is positive. (The 1979 IHÉS preprint by P. Cartier and Hejhal contains additional details of the story.) The trace formula resembles the explicit formula in certain ways. Many researchers have attempted to interpret Weil’s explicit formula in terms of Selberg’s trace formula. MARCH 2003. Some Other Equivalences of Interest Here are a few other easy-to-state equivalences of RH: • Hardy and Littlewood (1918): RH holds if and only if ∞  (−x)k = O x−1/4 as x → ∞. k! ζ(2k + 1) k=1 • Redheffer (1977): RH holds if and only if for every  > 0 there is a C() > 0 such that | det(A(n))| < C()n1/2+ , where A(n) is the n × n matrix of 0’s and 1’s defined by A(i, j) = 1 if j = 1 or if i divides j , and A(i, j) = 0 otherwise. It is known that A(n) has n − [n log 2] − 1 eigenvalues equal to 1. Also, A has a real eigenvalue √ (the spectral radius) which is approximately n , a√ negative eigenvalue which is approximately − n , and the remaining eigenvalues are small. • Lagarias (2002): Let σ (n) denote the sum of the positive divisors of n. RH holds if and only if. σ (n) ≤ Hn + exp(Hn ) log Hn for every n, where Hn = 1 +. 1 2. +. 1 3. + · · · + n1 .. Other Zeta- and L-Functions Over the years striking analogies have been observed between the Riemann zeta-function and other zeta- or L-functions. While these functions are seemingly independent of each other, there is growing evidence that they are all somehow connected in a way that we do not fully understand. In any event, trying to understand, or at least classify, all of the objects which we believe satisfy RH is a reasonable thing to do. The rest of the article will give a glimpse in this direction and perhaps a clue to the future. First, some examples of other functions that we believe satisfy RH. The simplest after ζ is the Dirichlet L-function for the nontrivial character of conductor 3 :. NOTICES. L(s, χ3 ) = 1 −. OF THE. 40. AMS. 1 1 1 1 1 + s − s + s − s + .... 2s 4 5 7 8.

<span class='text_page_counter'>(41)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. This can be written as an Euler product   (1 − p−s )−1 (1 + p−s )−1 , p≡1 mod 3. these L-functions are associated to modular forms of weight 2 . This modularity implies the functional equation √ ξE (s) := (2π / N )−s Γ (s + 1/2)LE (s) = ξE (1 − s).. p≡2 mod 3. it satisfies the functional equation  − s 2 ξ(s, χ3 ) := π3 Γ ( s+1 )L(s, χ3 ) = ξ(1 − s, χ3 ), 2 and it is expected to have all of its nontrivial zeros on the 1/2 -line. A similar construction works for any primitive Dirichlet character. Dedekind, Hecke, Artin, and others developed the theory of zeta-functions associated with number fields and their characters. These have functional equations and Euler products, and are expected to satisfy a Riemann Hypothesis. Ramanujan’s taufunction defined implicitly by ∞ ∞   x (1 − xn )24 = τ(n)xn n=1. n=1. also yields an L-function. The associated Fourier se∞ ries ∆(z) := n=1 τ(n) exp(2π inz) satisfies   az + b ∆ = (cz + d)12 ∆(z) cz + d for all integers a, b, c, d with ad − bc = 1 . A function satisfying these equations is called a modular form of weight 12. The associated L-function ∞  τ(n)/n11/2 ns n=1   τ(p)/p11/2 1 −1 = 1− + ps p2s p. L∆ (s) :=. satisfies the functional equation. ξ∆ := (2π )−s Γ (s + 11/2)L∆ (s) = ξ∆ (1 − s), and all of its complex zeros are expected to be on the 1/2 -line. Another example is the L-function associated to an elliptic curve E : y 2 = x3 + Ax + B , where A and B are integers. The associated L-function, called the Hasse-Weil L-function, is ∞  a(n)/n1/2 ns n=1    1 −1 a(p)/p1/2 = 1− + ps p2s pN   a(p)/p1/2 −1 × 1− , ps p|N. LE (s) =. where N is the conductor of the curve. The coefficients an are constructed easily from ap for prime p; in turn the ap are given by ap = p − Np , where Np is the number of solutions of E when considered modulo p. The work of Wiles and others proved that NOTICES. OF THE. 41. It is believed that all of the complex zeros of LE (s) are on the 1/2 -line. A similar construction ought to work for other sets of polynomial equations, but so far this has not been proved. What is the most general situation in which we expect the Riemann Hypothesis to hold? The Langlands program is an attempt to understand all L-functions and to relate them to automorphic forms. At the very least a Dirichlet series that is a candidate for RH must have an Euler product and a functional equation of the right shape. Selberg has given a set of four precise axioms which are believed to characterize the L-functions for which RH holds. Examples have been given that show the necessity of most of the conditions in his axioms.. L-Functions and Random Matrix Theory An area of investigation which has stimulated much recent work is the connection between the Riemann zeta-function and Random Matrix Theory (RMT). This work does not seem to be leading in the direction of a proof of RH, but it is convincing evidence that the spectral interpretation of the zeros sought by Hilbert and Pólya is an idea with merit. Moreover, the connection between zeta theory and RMT has resulted in a very detailed model of ζ(s) and its value distribution. Montgomery’s Pair Correlation Conjecture In 1972 Hugh Montgomery was investigating the spacings between zeros of the zeta-function in an attempt to solve the class number problem. He formulated his Pair Correlation Conjecture based in part on what he could prove assuming RH and in part on RH plus conjectures for the distribution of twin primes and other prime pairs. This conjecture asserts that  β     sin π u 2 1 ∼ N(T ) 1− du. πu α 2π β 2π α log T. <γ−γ  ≤ log T. The sum on the left counts the number of pairs 0 < γ, γ  < T of ordinates of zeros with normalized spacing between positive numbers α < β . Montgomery had stopped in Princeton on his way from St. Louis, where he had presented this result at an AMS symposium, to Cambridge University, where he was a graduate student. Chowla persuaded him to show this result to Freeman Dyson at afternoon tea at the Institute for Advanced Study. Dyson  sin π u. 2. immediately identified the integrand 1 − π u as the pair correlation function for eigenvalues of large random Hermitian matrices measured with a Gaussian measure—the Gaussian Unitary Ensemble that physicists had long been studying. AMS. VOLUME 50, NUMBER 3.

<span class='text_page_counter'>(42)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. in connection with the distribution of energy levels in large systems of particles. With this insight, Montgomery went on to conjecture that perhaps all the statistics, not just the pair correlation statistic, would match up for zeta-zeros and eigenvalues of Hermitian matrices. This conjecture is called the GUE conjecture. It has the flavor of a spectral interpretation of the zeros, though it gives no indication of what the particular operator is. Odlyzko’s Calculations In the 1980s Odlyzko began an intensive numerical study of the statistics of the zeros of ζ(s) . Based on a new algorithm developed by Odlyzko and Schönhage that allowed them to compute a value of ζ(1/2 + it) in an average time of t  steps, he computed millions of zeros at heights around 1020 and spectacularly confirmed the GUE conjecture.. trix explanation for these numbers. By 1998 Gonek and I had found a number-theoretic way to conjecture the answer for the eighth moment, namely g4 = 24024 . At RHII in Vienna, Keating announced that he and Snaith had a conjecture for all of the moments which agreed with g1 , g2 , and g3 . Keating, Snaith, and I—moments before Keating’s lecture—checked (amid great excitement!) that the Keating and Snaith conjecture also produced g4 = 24024 . The idea of Keating and Snaith was that if the eigenvalues of unitary matrices model zeta zeros, then perhaps the characteristic polynomials of unitary matrices model zeta values. They were able to compute—exactly—the moments of the characteristic polynomials of unitary matrices averaged with respect to Haar measure by using Selberg’s integral, which is a formula found in the 1940s by Selberg that vastly generalizes the integral for the beta-function. Keating and Snaith proposed that. Figure 8a. The nearest neighbor spacing for GUE (solid) and for 7.8 × 107 zeros of ζ(s) near the 1020 zero (scatterplot). Graphic by A. Odlyzko. Moments of Zeta More recently, RMT has led to a conjecture for moments of ζ on the critical line. Let  1 T Ik (T ) = |ζ(1/2 + it)|2k dt. T 0 Asymptotic formulas for I1 and I2 were found by Hardy and Littlewood and Ingham by 1926. In 1995 Ghosh and I formulated a conjecture for I3 and set up a notation to clarify the part missing from our understanding of Ik . After scaling out the arithmetic parts, we identified a factor gk which we could not predict. The factor is g1 = 1 and g2 = 2 for the second and fourth moments and conjecturally g3 = 42 for the sixth moment. At RHI in Seattle, Sarnak proposed to Keating that he find a random maMARCH 2003. Figure 8b.The pair-correlation function for GUE (solid) and for 8 × 106 zeros of ζ(s) near the 1020 zero (scatterplot). Graphic by A. Odlyzko.. gk = k2 !. k−1  j=0. j! . (j + k)!. Farmer and I (2000) proved that gk is always an integer and found that it has an interesting prime factorization. Families At RHI in Seattle, Sarnak gave a lecture on families of L-functions based on work that he and Katz were doing. They discovered a way to identify a symmetry type (unitary, orthogonal, or symplectic) with various families of L-functions. Their work was based on studying families of zeta-functions over finite fields (for which RH was already proved by Weil for curves and by Deligne for general varieties). For these zeta-functions, Katz and Sarnak proved that the zeros of the family were distributed exactly. NOTICES. OF THE. 42. AMS.

<span class='text_page_counter'>(43)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Figure 9. A comparison of the distribution of the lowest lying zero for two families of L-functions. In each case one first needs to suitably normalize the zeros. The first figure compares the distribution of the lowest zero of L(s, χd ) , Dirichlet L-functions, for several thousand d ’s of size 1012 , against the distribution of the zero closest to 1 for large unitary symplectic matrices. In the second picture we show the same statistic, but for several thousand even quadratic twists d of size 500,000, of the Ramanujan τ cusp form L-function. This is compared to the distribution of the zero closest to 1 for large orthogonal matrices with even characteristic polynomial (in the latter family, one needs to distinguish between even and odd twists). Graphics by M. Rubinstein. as the RMT distributions of the monodromy group associated with the family. Katz and Sarnak stress that the proofs of Weil and Deligne use families of zeta-functions over finite fields to prove RH for an individual zetafunction. The modelling of families of L-functions by ensembles of random matrix theory gives evidence for a spectral interpretation of the zeros, which may prove important if families are ultimately used to prove RH. At this point, however, we do not know what plays the role of the monodromy groups in this situation. RMT and Families Keating and Snaith extended their conjectures to moments of families of L-functions by computing moments of characteristic polynomials of symplectic and orthogonal matrices, each with their own Haar measure. (It should be mentioned that the orthogonal and symplectic circular ensembles used by the physicists do not use Haar measure and so have different answers. Katz and Sarnak figured out that Haar measure must be used to model L-functions.) Further works by Farmer, Keating, Rubinstein, Snaith, and this author have led to precise conjectures for all of the main terms in moments for many families of L-functions. These results are so precise that they lead to further conjectures about the distribution of values of the L-functions. We can even predict how frequently we find double zeros at the center of the critical strip of L-functions within certain families. NOTICES. OF THE. 43. Figure 10. The second zero for L(s, χd ) as compared to the RMT prediction. Graphic by M. Rubinstein.. Figure 11. The distribution of values of |ζ(1/2 + it)| near t = 106 compared with the distribution of values of characteristic polynomials of 12 × 12 unitary matrices. Graphic by N. Snaith.. AMS. VOLUME 50, NUMBER 3.

<span class='text_page_counter'>(44)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. The Conspiracy of L-Functions There is a growing body of evidence that there is a conspiracy among L-functions—a conspiracy which is preventing us from solving RH! The first clue that zeta- and L-functions even know about each other appears perhaps in works of Deuring and Heilbronn in their study of one of the most intriguing problems in all of mathematics: Gauss’s class number problem. Gauss asked whether the number of equivalence classes of binary quadratic forms of discriminant d < 0 goes to ∞ as d goes to −∞ . The equivalence class of a quadratic form Q(m, n) = am2 + bmn + cn2 of discriminant d = b2 − 4ac consists of all of the quadratic forms obtained by a linear substitution m → αm + βn , n → γm + δn , where α, β, γ, δ are integers with αδ − βγ = 1 . The number h(d) of these equivalence classes is called the class number and is known to be finite. Equivalently, h(d) is the number√of ideal classes of the imaginary quadratic field Q( d ) . The history of Gauss’s problem is extremely interesting; it has many twists and turns and is not yet finished—we seem to be players in the middle of a mystery novel. Deuring and Heilbronn were trying to solve Gauss’s problem. The main tool they were using was the beautiful class number formula of Dirichlet,  h(d) = |d| L(1, χd )/π (|d| > 4 ), which gives the class number in terms of the value of the L-function at 1 , which is at the edge of the critical strip. So the question boils down to giving a lower bound for L(1, χd ) ; this question, in turn, can be resolved by proving that there is no real zero of L(s, χd ) very near to 1 . Hecke had shown that the truth of RH for L(s, χd ) implies that h(d) → ∞ . Then Deuring proved that the falsity of RH for ζ(s) implies that h(d) > 1 for large |d|. Finally, Heilbronn showed that the falsity of RH for L(s, χ) for any χ implied that h(d) → ∞ . These results together proved Gauss’s conjecture and gave a first indication of a connection between the zeros of ζ(s) and those of L(s, χd ) ! Later Landau showed that a hypothetical zero of L(s, χd1 ) very near to 1 implies that no other L(s, χd ) , d = d1 , could have such a zero, further illustrating that zeros of L(s, χd ) know about each other. Siegel strengthened this approach to show that for every  > 0 there is a c() > 0 such that no zero β of L(s, χd ) satisfies β > 1 − c()|d|− . The problem with the arguments of Landau and Siegel is that the constant c() cannot be effectively computed, and so the bound cannot be used to actually calculate the list of discriminants d with a given class number, which presumably is what Gauss wanted. The ineffectivity comes about from the assumption that some L-function actually has a real zero near 1 . Such a hypothetical zero of MARCH 2003. some L-function, which no one believes exists, is called a Landau-Siegel zero. In fact, one can show that if there is some d1 such that L(s, χd1 ) has a zero at β < 1, then it follows that h(d) > c|d|β−1/2 / log |d| for all other d, where c > 0 can be effectively computed. Thus, the closer to 1 the hypothetical zero is, the stronger the result. But note also that any zero bigger than 1/2 would give a result. The basic idea behind this approach is that if there is an L(s, χd ) with a zero near 1, then χd (p) = −1 for many small primes. In other words, χd mimics the Möbius function µ(n) for small n. This is consistent with the fact that ∞  µ(n) ns n=1. has a zero at s = 1 (since ζ(s) has a pole at s = 1 ). The Landau-Siegel Zero Much effort has gone toward trying to eliminate the Landau-Siegel zero described above and so find an effective solution to Gauss’s problem. However, the L-function conspiracy blocks every attempt exactly at the point where success appears to be in sight. We begin to suspect that the battle for RH will not be won without getting to the bottom of this conspiracy. Here are some tangible examples which give a glimpse of this tangled web. The Brun-Titchmarsh theorem. Let π (x; q, a) denote the number of primes less than or equal to x that lie in the arithmetic progression a mod q . Sieve methods can show that for any 1 ≤ q < x the inequality. π (x; q, a) ≤ 2. x φ(q) log(x/q). holds, where φ is Euler’s phi-function. It is believed that the same theorem should be true with 2 replaced by any number larger than 1 and sufficiently large x . Any lowering of the constant 2 would eliminate the Landau-Siegel zero. In particular, Motohashi [1979] proved that if 1 − δ is a real zero of L(s, χq ) , then if for x ≥ q c the Brun-Titchmarsh theorem is valid in the form π (x; q, a) ≤ (2 − α)x/(φ(q) log(x/q)) , where α > 0 is an absolute constant, then δ ≥ c  ξ/ log q , where c and c  are certain numerical constants. The Alternative Hypothesis. This is an alternative to the GUE model for the distribution of zeros. It proposes the existence of a function f (T ) that goes to 0 as T → ∞ such that if any two consecutive ordinates γ and γ  of zeros of ζ larger than some T0 are given, then the normalized gap 2π (γ log γ − γ  log γ  ) between γ and γ  is within f (T0 ) of half of an integer. This hypothesis is clearly absurd! However, ruling this out would eliminate the Landau-Siegel zero (Conrey–Iwaniec (2002)), and so for all we know it could be true.. NOTICES. OF THE. 44. AMS.

<span class='text_page_counter'>(45)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. If one could prove, for example, that there is a δ > 0 such that for all sufficiently large T there is a pair of consecutive zeros with ordinates between T and 2T whose distance apart is less than 1/2 − δ times the average spacing, then the alternative hypothesis would be violated. Random matrix theory predicts the exact distribution of these neighbor spacings and shows that we should expect that about 11 percent of the time the neighbor gaps are smaller than 1/2 of the average. These ideas were what led Montgomery to consider the paircorrelation of the zeros of ζ(s) mentioned above. He showed that there are arbitrarily large pairs of zeros that are as close together as 0.68 of the average spacing. Later works have gotten this bound down to 0.5152. There are indications that using work of Rudnick and Sarnak on higher correlations of the zeros of ζ , one might be able to reach 0.5, but 0.5 is definitely a limit (more like a brick wall!) of all of the known methods. Vanishing of modular L-functions. The most spectacular example is the work of Iwaniec and Sarnak. They showed that if one could prove that there is a δ > 0 such that more than 1/2 + δ of the modular L-functions of a fixed weight, large level, and even functional equation do not vanish, then the Landau-Siegel zero could be eliminated. It is predicted that all but an infinitesimal proportion of these values are nonzero; they just needed one-half plus δ of them to be nonzero. They can prove that 50 percent do not vanish, but despite their best efforts they cannot get that extra little tiny bit needed to eliminate the Landau-Siegel zero.. A Clue and a Partial Victory The only approach that has made an impact on the Landau-Siegel zero problem is an idea of Goldfeld. In 1974 Goldfeld, anticipated somewhat by Friedlander, realized that while a zero at 1/2 would barely fail to produce a lower bound for the class number tending to infinity, a multiple zero at 1/2 would produce a lower bound which, while not a positive power of |d| , still goes to ∞ . Moreover, it was believed—by virtue of the Birch and Swinnerton-Dyer conjecture—that zeros of high multiplicity do exist and the place to look for them is among L-functions associated to elliptic curves with large rank. However, it was not until 1985 that Gross and Zagier demonstrated conclusively that there exist L-functions with triple zeros at 1/2 . This led to the lower bound that for any  > 0 there is an effectively computable c1 () > 0 such that h(d) > c1 ()(log |d|)1− . This is a long way from the ex pected h(d) > c |d|/ log |d| , but it did solve Gauss’s problem. The clue that it gave us was to study exotic L-functions, or extremal L-functions, which have zeros of high multiplicity at the center. At present, our best hope for finding these NOTICES. OF THE. 45. L-functions is to look at elliptic curves with many rational points. Iwaniec’s Approach Iwaniec, in his lecture at RHIII, proposed a way to take advantage of the above ideas. In a nutshell, his idea is to take a family of L-functions having a multiple zero at 1/2 and use this family to obtain useful approximations for the Möbius function µ(n) as a linear combination of the coefficients of the L-functions from the family. In this way, the Möbius function is tamed. One example of a family considered by Iwaniec is the family of L-functions associated to the elliptic curves. EA,B 2 : y 2 = x3 + Ax + B 2 , which have a rational point (B, 0) and so have rank at least one. Considering A and B in certain arithmetic progressions shows that the associated L-function must have a double zero at the center. Iwaniec presented three conjectures which together would eliminate the Landau-Siegel zero. The main two theorems needed to complete his program are a bound for the second moment  LA,B 2 (1/2)2 = O X 7/12 (log X)C A≈X 1/3 , B≈X 1/4. of this family together with a good estimate (squareroot cancellation uniform in M , N , and q ) for the incomplete exponential sum    m3 n−4 χq (mn) exp 2π i , q M<m<2M,N<n<2N the kind of estimate that for a completed exponential sum follows from the RH for varieties proved by Deligne. Iwaniec has similar, but more complicated, constructions that would lead to a quasi-Riemann hypothesis, producing a concrete β < 1 such that there are no zeros to the right of the line through β . Iwaniec’s approach will likely reduce the question of RH, which is ostensibly about zeros or poles, into several subsidiary questions that have a much different flavor, such as finding upper bound estimates for moments and values of L-functions. This approach offers hope of attack by methods from analytic number theory.. Conclusion A major difficulty in trying to construct a proof of RH through analysis is that the zeros of L-functions behave so much differently from zeros of many of the special functions we are used to seeing in mathematics and mathematical physics. For example, it is known that the zeta-function does not satisfy any differential equation. The functions which do arise as solutions of some of the classical differential equations, such as Bessel functions, hypergeometric. AMS. VOLUME 50, NUMBER 3.

<span class='text_page_counter'>(46)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. functions, etc., have zeros which are fairly regularly spaced. A similar remark holds for the zeros of solutions of classical differential equations regarded as a function of a parameter in the differential equation. For instance, in the Pólya theorem above comparing φ(t) with Φ(t) , the zeros are actually zeros of a Bessel function of fixed argument regarded as a function of the index. Again the zeros are regularly spaced. On the other hand, the zeros of L-functions are much more irregularly spaced. For example, the RMT models predict that for any  > 0 there are infinitely many pairs of zeros ρ and ρ  such that |ρ − ρ  | < |ρ|−1/3+ . Generally it is believed that all zeros of all L-functions are linearly independent (in particular, simple), except that certain L-functions can have a zero at s = 1/2 of high multiplicity. The conjecture of Birch and Swinnerton-Dyer asserts that the multiplicity of the zero of the L-function associated with a given elliptic curve is equal to the rank of the group of rational points on the elliptic curve. It is known that the latter can be as large as 26, and it is generally believed to get arbitrarily large. None of the methods from analysis seem capable of dealing with such exotic phenomena. It is my belief that RH is a genuinely arithmetic question that likely will not succumb to methods of analysis. There is a growing body of evidence indicating that one needs to consider families of L-functions in order to make progress on this difficult question. If so, then number theorists are on the right track to an eventual proof of RH, but we are still lacking many of the tools. The ingredients for a proof of RH may well be moment theorems for a new family of L-functions not yet explored; modularity of Hasse-Weil L-functions for many varieties, like that proved by Wiles and others for elliptic curves; and new estimates for exponential sums, which could come out of arithmetic geometry. The study of L-functions is still in its beginning stages. We only recently learned the modularity of the L-functions associated to elliptic curves; it would be very helpful to understand the L-functions for more complicated curves and generally for varieties. It would be useful to systematically compute many new examples of L-functions to get a glimpse of what is out there waiting to be discovered. The exotic behavior of the multiple zeros of L-functions associated to elliptic curves with many rational points could be just the beginning of the story.. and Sandra Frost for their assistance with the graphics in the article. —J.B.C. References • E. BOMBIERI, Problems of the Millennium: The Riemann Hypothesis, riemann.htm. • HAROLD DAVENPORT, Multiplicative Number Theory, third edition, revised and with a preface by Hugh L. Montgomery, Grad. Texts in Math., vol. 74, Springer-Verlag, New York, 2000. • P. A. DEIFT, Orthogonal Polynomials and Random Matrices: A Riemann-Hilbert Approach, Courant Lecture Notes in Math., vol. 3, New York University, Courant Institute of Mathematical Sciences, New York; Amer. Math. Soc., Providence, RI, 1999. • HENRYK IWANIEC, Introduction to the Spectral Theory of Automorphic Forms, Bibl. Rev. Mat. Iberoamericana [Library of the Revista Matemática Iberoamericana], Rev. Mat. Iberoamericana, Madrid, 1995. • ———, Topics in Classical Automorphic Forms, Grad. Stud. Math., vol. 17, Amer. Math. Soc., Providence, RI, 1997. • NICHOLAS M. KATZ and PETER SARNAK, Random Matrices, Frobenius Eigenvalues, and Monodromy, Amer. Math. Soc. Colloq. Publ., vol. 45, Amer. Math. Soc., Providence, RI, 1999. • MADAN LAL MEHTA, Random Matrices, second edition, Academic Press, Inc., Boston, MA, 1991. • A. M. O D L Y Z K O , ~odlyzko/. • ATLE SELBERG, Old and New Conjectures and Results about a Class of Dirichlet Series, Collected Papers, Vol. II, with a foreword by K. Chandrasekharan, SpringerVerlag, Berlin, 1991. • E. C. TITCHMARSH, The Theory of the Riemann ZetaFunction, second edition, edited and with a preface by D. R. Heath-Brown, The Clarendon Press, Oxford University Press, New York, 1986.. Acknowledgements I would like to thank David Farmer, K. Soundararajan, Roger Heath-Brown, Brianna Conrey, and Harold Boas for their valuable comments during the preparation of this article. Also, I thank Andrew Odlyzko, Michael Rubinstein, Nina Snaith, MARCH 2003. NOTICES. OF THE. 46. AMS.

<span class='text_page_counter'>(47)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Applied Mathematics, Technology and Education Journal – No 02, 07/2017. SOME EXAMPLES TO SHOW THAT OBJECTS BE PRESENTED BY MATHEMATICAL EQUATIONS Minh Tran Bowling Green State University, Ohio, USA. ABSTRACT We have usually heard about the kinds of equations, including the equations of lines, the equations of curves, the equations of invisible and visible objects. Actually, with each object, we could present them by mathematical equations. Each equation can plot a graph and we also can talk that each any object always can be presented by an equation.Equations not only present visible objects but also they can present invisible objects such as wave equations in the differential equations.In fact, the changes of objects and phenomena are the changes of equations. The universe has always presented by mathematical equations. The movement of the universe is the change of equations. In the paper, we will plot some equations by Mathematica software to see their graphs in the plane and space, and this can be a small proof of this conclusion.. 1. Introduction a. In the plane In Cartesian coordinates We can plot the linear equation : y = ax + b The graph of this equation is a line. We also plot the graph of higher order equations as follows : Quadratic equation : y = ax2 + bx + c(a 6= 0). (1). (2). Cubic equation :. y = ax3 + bx2 + cx + d(a 6= 0) 47. (3).

<span class='text_page_counter'>(48)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. And higher order equations. The graphs of these equations are curves. In Polar coordinate We can plot some graphs in this coordinate. We will use two variables in the equation. Generally, we will introduce the equations of circles with the forms as follows: (4). (x − a)2 + (y − b)2 = r2 We will vary from Cartesian coordinate to Polar coordinate by using: x = r cos(θ) y = r sin(θ).. (5). b. In the space We will plot some objects in the space to see relationships between equations and graphs. We will use three variables in this equation.. 2. Some equations in Cartesian coordinates These are some of the most important functions in all of mathematics. See [?, Chapter 4].. 2.1. Linear equation We see that the equation of line with the following form : (6). y = ax + b. With a = 0, we have the equation y = b, with b = 2 or b = -2. Using Mathematica software to plot these graphs In Mathematica Input: Plot[{2, -2},{x, -10, 10}]. Press the keys: "Shift and Enter" at the end of the command line. We have the equation of equations : 2. 1. -10. -5. 5. -1. -2. 48. 10.

<span class='text_page_counter'>(49)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Where a > 0, we will plot the equation y = 2x Input: Plot[2x,{x, -10, 10}]. Press the keys: "Shift and Enter" at the end of the command line.. 20. 10. -10. -5. 5. 10. -10. -20. Where a < 0, we will plot the equation y = −2x Input: Plot[-2x,{x, -10, 10}]. Press the keys: "Shift and Enter" at the end of the command line.. 20. 10. -10. -5. 5. 10. -10. -20. 2.2. Quadratic Equation [2] We know that the graphs of quadratic equations have parabolic form : y = ax2 + bx + c(a 6= 0) In Mathematica Where a > 0, we can plot the equation y = 2x2 + 3x + 5 Input: 49. (7).

<span class='text_page_counter'>(50)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Plot[2x^{2}+3x+5,{x,-11,10}]. Press the keys: "Shift and Enter" at the end of the command line.. 200. 150. 100. 50. -10. -5. 5. 10. Where a < 0, we can plot the equation y = −2x2 + 3x + 5 Input: Plot}[-2x^{2}+3x+5,{x,-10,12}]. Press the keys: "Shift and Enter" at the end of the command line.. -10. -5. 5. 10. -50. -100. -150. -200. -250. 2.3. Cubic equation We know that the graphs of cubic equation have curve forms: y = ax3 + bx2 + cx + d(a 6= 0) In Mathematica Where a > 0, we can plot the equation y = 2x3 + 3x2 + 4x + 5 Input: 50. (8).

<span class='text_page_counter'>(51)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Plot[2x^{3}+3x^{2}+4x+5,{x,-10,10}]. Press the keys: "Shift and Enter" at the end of the command line.. 2000. 1000. -10. -5. 5. 10. -1000. Where a < 0, we can plot the equation y = −2x3 + 3x2 + 4x + 5 Input: Plot[-2x^{3}+3x^{2}+4x+5,{x,-10,10}]. Press the keys: "Shift and Enter" at the end of the command line.. 2000. 1000. -10. -5. 5. 10. -1000. 2.4. Some higher order equations Quartic equation[4]. y = ax4 + bx3 + cx2 + dx + e(a 6= 0). Plot graph of the equation : y = −6x4 + 12x2 − 3x + 13 Input: Plot[-6x^{4}+12x^{2}-3x+13,{x,-2,2}]. 51. (9).

<span class='text_page_counter'>(52)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Press "Shift and Enter" at the end of the command line.. 20. 10. -2. -1. 1. 2. -10. -20. -30. -40. Quintic equation[4] y = ax5 + bx5 + cx3 + dx2 + ex + f (a 6= 0) Plot graph of the equation : y = 2x5 + 6x4 − 8x2 + x − 3 Input: Plot[2x^{5}+6x^{4}-8x^{2}+x-3,{x,-1.8,1.8}]. Press "Shift and Enter" at the end of the command line.. 15. 10. 5. -1.5. -1.0. -0.5. 0.5. 1.0. 1.5. -5. 100 th order equation[2] Plot graph of the equation : y = x100 + 6x50 − 8x10 + x − 3 Input: Plot[ x^{100} + 6 x^{50} - 8 x^{10} + x - 3,{x,-1,1}]. Press the keys: "Shift and Enter" at the end of the command line.. 52. (10).

<span class='text_page_counter'>(53)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. -3. -4. -5. -6. -7. -1.0. -0.5. 0.5. 1.0. Moreover, we also can plot graphs of other equations such as : Exponential equations, Logarithmic equations, Trigonometric equations, Differential equations, etc.. 3. Some equation in Polar coordinates 3.1. Circle equations Generally, we will introduce the equation of circles with the form : (x − a)2 + (y − b)2 = r2 Choose r = 2, a = b = 0. We have the equation : x2 + y 2 = 4. We can directly plot with the command. Input: ContourPlot[x^{2} + y^{2} == 4,{x, -2, 2},{y, -2, 2},PlotLabel->{"THE CIRCLE x^{2} + y^{2} == 4"}]. Press the keys: "Shift and Enter" at the end of the command line.. 53. (11).

<span class='text_page_counter'>(54)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. We can vary to polar coordinates, where x ∈ [0, 2π]: Set : x = 2 cos(x) y = 2 sin(x).. (12). Plot graph of the equation in Mathematica Input: Plot[{2cos[x], 2sin[x]},{x,0,2pi}]. Press "Shift and Enter" at the end of the command line.. 2. 1. -2. -1. 1. 2. -1. -2. 3.2. Elliptic equations Input: ParametricPlot[{{3 Cos[t],3 Sin[t]},{2 Cos[t], 2 Sin[t]},{4 Cos[t], Sin[t]},{4 Cos[t], Sin[t]},{Cos[t], 4 Sin[t]},{Cos[t], Sin[t]}},{t,0,2pi}]. Press "Shift and Enter" at the end of the command line.. 54.

<span class='text_page_counter'>(55)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017 4. 2. -4. -2. 2. 4. -2. -4. 3.3. The equation of Heart [1] Input: ParametricPlot[{(2 - 2 Sin[u]) Cos[u],(2 - 2 Sin[u]) Sin[u]},{u,0,2pi}, PlotStyle -> Thick, ColorFunction -> Function[{x, y, u},Hue[u(2pi)]],ColorFunctionScaling->False]. Press "Shift and Enter" at the end of the command line.. 3.4. The equation of wedding Input: ContourPlot[{(x^{2} + y^{2} - 1)^{3} - x^{2} y^{3} == 0, ((x - 1.5)^{2} + y^{2} - 1)^{3} - (x - 1.5)^{2} y^{3} == 0},{x, -2, 3},{y, -2, 3}, PlotLabel->{"SONG HY"},ContourStyle -> Red]. 55.

<span class='text_page_counter'>(56)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Press "Shift and Enter" at the end of the command line.. 4. Some equations in space 4.1. The equation of Apple Input: ParametricPlot3D[{(2 - 2 Sin[v]) Cos[u], (2 - 2 Sin[v]) Sin[u], 2 - 3.5 Cos[v]},{u, 0, 2pi},{v, 0,2pi},PlotLabel->{"The equation of Apple"}]. Press "Shift and Enter" at the end of the command line.. 56.

<span class='text_page_counter'>(57)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. 4.2. The equation of Sphere [2] Generally, we will write the equation of sphere with the following form: (x − a)2 + (y − b)2 + (z − c)2 = r2. (13). where I(-a,-b,-c) is the centre of the sphere Choose r = 1, a = b = c = 0. We have the equation : x2 + y 2 + z 2 = 1 We can directly plot with the command. Input: ContourPlot3D[x^{2} + y^{2} + z^{2} == 4,{x, -2, 2},{y, -2, 2},{z, -2, 2},PlotLabel->{"THE SPHERE x^{2} + y^{2} + z^{2} == 4"}]. Press "Shift and Enter" at the end of the command line.. We can vary to polar coordinates ,where u, v ∈ [0, 2π]: x = sin(u) cos(v) y = sin(u) sin(v) z = cos(u). (14). Plot graph of the equation in Mathematica Input: ParametricPlot3D[{Sin[u]Sin[v],Sin[u]Cos[v],Cos[u]},{u,-2pi,2pi},{v,-2pi,2pi}]. 57.

<span class='text_page_counter'>(58)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Press "Shift and Enter" at the end of the command line.. 4.3. The equations of Rings[1] Plot graph of the equation in Mathematica Input: ParametricPlot3D[{{4 + (3 + Cos[v]) Sin[u], 4 + (3 + Cos[v]) Cos[u], 4 + Sin[v]}, {8 + (3 + Cos[v]) Cos[u], 3 + Sin[v], 4 + (3 + Cos[v]) Sin[u]}, {12 + (3 + Cos[v]) Sin[u], 4 + (3 + Cos[v]) Cos[u], 4 + Sin[v]}, {16 + (3 + Cos[v]) Cos[u], 3 + Sin[v] , 4 + (3 + Cos[v]) Sin[u]}},{u, 0, 2pi}, {v, 0,2pi}, PlotStyle ->{Red, Green, Blue, Yellow}]. Press "Shift and Enter" at the end of the command line.. 58.

<span class='text_page_counter'>(59)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Ring Equations. 4.4. Wedding Equations[1] Input: ContourPlot3D [{{(2 x^2 + y^2 + z^2 - 1)^3 - (1/10) x^2 z^3 y^2 z^3}, {(2 x^2 + (y - 1)^2 + z^2 - 1)^3 - (1/ 10) x^2 z^3 - (y - 1)^2 z^3}}, {x, -0.9, 2.5}, {y, -1.2, 2.5}, {z, -1.2, 2.5}, Contours -> {0}, ContourStyle -> Pink, Axes -> False, ViewPoint -> {2, .1, .5}, Mesh -> None, BoxRatios -> {.6, .6, .8}, PlotLabel -> "WEDDING EQUATION"]. Press "Shift and Enter" at the end of the command line.. Wedding Equation. 4.5. Wave Equation in plane [1] We have the differential equation : y 00 (x) + tan(y(x)) = 0, with initial condition y(0) = 1, y 0 (0) = 0 Using Mathematica software to plot the wave form of this equation Input: wave1 ={y’’[x] + Tan[y[x]] == 0, y[0] == 1, y’[0] == 0}; sol = NDSolve[wave1,y,{x, -10, 10}] Plot[y[x]/. sol, {x, -10, 10}]. Press "Shift and Enter" at the end of the command line.. 59.

<span class='text_page_counter'>(60)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 4.6. Wave Equation in space[1] We have the differential equation[3] : utt (t, x) = uxx (t, x),with initial boundary condition u(0, x) = sin(x), u0x (0, x) = 0 Using Mathematica software to plot the wave form of this equation Input: wave2 = NDSolve[{D[u[t, x], t, t] == D[u[t, x], x, x], u[0, x] == Sin[x], Derivative[1, 0][u][0, x] == 0}, u,{t, 0, 10},{x, -10, 10}] Plot3D[Evaluate[u[t, x]/.wave2], {t, 0, 10},{x, -10, 10}]. Press "Shift and Enter" at the end of the command line.. 5. Conclusion This paper is shown that some the visible and invisible figures of the equations. Clearly,the mathematical equations have presented objects in the plane and space. Each object will be plotted by an equation. With the supporting of computer software, we can plot many objects from 60.

<span class='text_page_counter'>(61)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. known equations. Contrarily, if we have some known objects then we also can be known the equations of those objects. In future, we may create out a machine equation which can find mathematical equations from any known objects. This paper also kindle a new ideas about the change of equation. If equation has changed then object has also changed and the contradiction of this problem. The death of people, animals and plants seem to be the changes of equations. How do you think about this?. Tài liệu [1] Supporting contents of Mathematica 7.0 softwave, Wolfram Company. [2] Minh Tran, Using scientific calculators to solve the mathematical problems for excellent students, Casio Scientific Calculator company, 2009. [3] Robert Smith, Roland Minton, Calculus 3rd Edition, McGraw-Hill Science Engineering, 2007 [4] Robert J Lopez, Advanced Engineering Mathematics,Addison-Wesley 2001. [5] S.C. Chapra., 2012. Applied Numerical Methods with Matlab for Engineers and Scientists, Third edition. New York: McGraw-Hill. [6] W. Cheney., D. Kincaid. 2008. Numerical Mathematics and Computing, Sixth edition. Belmont. CA: Thomson, 582-624.. 61.

<span class='text_page_counter'>(62)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Titanic Survival Prediction Tran Viiet Tuan Tu Department of Mathematics and Computer Science Temple University, Pennsylvania, USA Summer Internship award 2017 in Cincinnadi, Ohio,USA Email: 1. Introduction to Machine Learning with Kaggle’s Titanic prediction challenge. 1.1. Introduction. In the data science and machine learning world, Kaggle is the most well known platform for analytic competitions. Big companies around the US and the world usually post their challenges on the website to attract aspiring data scientists and veteran machine learning engineers to help solve their business problems. For example, the Department of Homeland Security posted a challenge of screening potentially dangerous individuals coming to the US: The problem has since attracted 65 teams competing for a grand prize of $1,500,000. Or, Zillow, one of the biggest tech-real estate companies, offered $1,200,000 to whoever could solve their home value prediction conumdrum, probably one of the most well known problems in the data science field. In other to enter such high-reward challenges, one needs to have years of experience in machine learning and statistical modeling. However, being exposed to Kaggle needs not to be restricted to machine learning PhDs or senior software engineers in Silicon Valley, which is exactly the point of this tutorial. In this short but informative article, I strive to (gently) introduce you to the world of data science through Kaggle’s most famous starter challenge: Titanic: Machine Learning from Disaster. 1.1.1. A brief pep talk about data science:. Data science, according to Wikipedia, “is an interdisciplinary field about scientific methods, processes, and systems to extract knowledge or insights from data in various forms, either structured or unstructured, similar to data mining”. In other words, it can be understood as “statistics of the 21st century”. Traditional statistics has been one of the most important tools of humanity, but the whole process of gathering data, doing surveys, making predictions is manual, time-consuming and does not scale well to an increasing influx of information every day. Ever since the Internet era, data generated by humans around the globe has been exponentially rising every single day. The more technological products we have, the more data we generate. And in a lot of cases, data does not only include photos, videos, texts but also behaviors characteristics. For example, in the data collection pipeline of Facebook, there is information about a person’s photos, videos, age, sex, and friends. The unraveling of such information results in a term we usually hear, big data. With the ever increasing amount of information, there comes a special need for the ability to predict. 62.

<span class='text_page_counter'>(63)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. the future, detect the pattern and draw insightful conclusion from that information. Hence, data science. 1.1.2. Problem statement:. In this tutorial, we will go through the process of of prediction based on data. Specifically, we are given a dataset containing information including sex, age, first or second class seating, cabin number and a binary number telling us whether a person survives the Titanic tragedy or not (1 for surviving and 0 for no). Our goal is to make a mathematical model based on that data and predicts whether a person survives the Titanic crash or not given new data points. This is called a supervised learning problem when we are given a labeled dataset in which every instance of our training set has an outcome. In this Titanic challenge, our training set includes a person’s survival information. In an unsupervised challenge, we are not given that kind of information. Since we are trying to come up with a model that tells whether a person survives, ours is called a classification, or more particularly binary classificiation, problem. Okay, enough with the introduction, let’s get our hands on doing the dirty work now!. 1.2 1.2.1. Data gathering and exploration: Downloading data from Kaggle:. Now, let’s go to the Kaggle website and download the datasets: As you can see, there are training and test sets. The point of splitting into two different categories is that if we only used one set and optimize our model’s parameters for that one set, our model would overfit the training examples. In other words, our model has a high chance of predicting a person’s survival correctly in that particular set, but does not generalize well to future data points. This is very dangerous because imagine you were training a model to predict a person’s chance of being a terrorist and it overfits the data, it would miss a lot of potential terrorists when your model comes into production. However, having another test set would not have solved the problem. We will also have to split our training examples one more time to do validation, because chances are if we cherry pick our parameters based on the test set performance, ours would also likely overfit the test set. In this challenge, however, the test set does not have a label is reserved for judging. So the general steps to train a model are: 1) Split our data into three sets: training, validation and test sets. 2) Training our model to minimize the errors on the training set. 3) Try with different hyperparameters (we’ll see later what they mean) and select the best combinations from doing validation (using a method such as k-fold cross validation) 4) Test our model performance using the test set But before that, there are some really important steps we need to do: cleaning the data and make sure it is ready for machine learning.. 63.

<span class='text_page_counter'>(64)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 1.2.2. Exploring data and building intuition:. In [302]: # First, let's import some Python modules and packages we would use import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LogisticRegression from sklearn.model_selection import StratifiedKFold, cross_val_score from sklearn.base import clone. %matplotlib inline plt.style.use('default') Now let’s load data from csv files: In [2]: train_set = pd.read_csv("train.csv") test_set = pd.read_csv("test.csv") # There are some operations we need to do on both # the training and test sets, such as data cleaning # or replacing empty values titanic = train_set.append(test_set) print(f'Combined dataset size is {titanic.shape}') print(f'Training set size is {train_set.shape}') print(f'Test set size is {test_set.shape}') # Let's explore the structure of our data titanic.head() Combined dataset size is (1309, 12) Training set size is (891, 12) Test set size is (418, 11). Out[2]: 0 1 2 3 4. Age Cabin Embarked 22.0 NaN S 38.0 C85 C 26.0 NaN S 35.0 C123 S 35.0 NaN S. Fare 7.2500 71.2833 7.9250 53.1000 8.0500. 0 1 2 3 4. Name Braund, Mr. Owen Harris Cumings, Mrs. John Bradley (Florence Briggs Th... Heikkinen, Miss. Laina Futrelle, Mrs. Jacques Heath (Lily May Peel) Allen, Mr. William Henry. 64. \. Parch 0 0 0 0 0. PassengerId 1 2 3 4 5. \.

<span class='text_page_counter'>(65)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. 0 1 2 3 4. Pclass 3 1 3 1 3. Sex male female female female male. SibSp 1 1 0 1 0. Survived 0.0 1.0 1.0 1.0 0.0. Ticket A/5 21171 PC 17599 STON/O2. 3101282 113803 373450. In [3]: train_set.head() Out[3]: 0 1 2 3 4. PassengerId 1 2 3 4 5. Survived 0 1 1 1 0. 0 1 2 3 4. Name Braund, Mr. Owen Harris Cumings, Mrs. John Bradley (Florence Briggs Th... Heikkinen, Miss. Laina Futrelle, Mrs. Jacques Heath (Lily May Peel) Allen, Mr. William Henry. 0 1 2 3 4. Parch 0 0 0 0 0. Ticket A/5 21171 PC 17599 STON/O2. 3101282 113803 373450. Pclass 3 1 3 1 3. \. Sex male female female female male. Age 22.0 38.0 26.0 35.0 35.0. SibSp 1 1 0 1 0. Fare Cabin Embarked 7.2500 NaN S 71.2833 C85 C 7.9250 NaN S 53.1000 C123 S 8.0500 NaN S. In [4]: test_set.head() Out[4]: 0 1 2 3 4. PassengerId 892 893 894 895 896. Pclass 3 3 2 3 3. 0 1 2 3 4. Age 34.5 47.0 62.0 27.0 22.0. Parch 0 0 0 0 1. SibSp 0 1 0 0 1. Name Kelly, Mr. James Wilkes, Mrs. James (Ellen Needs) Myles, Mr. Thomas Francis Wirz, Mr. Albert Hirvonen, Mrs. Alexander (Helga E Lindqvist) Ticket 330911 363272 240276 315154 3101298. Fare Cabin Embarked 7.8292 NaN Q 7.0000 NaN S 9.6875 NaN Q 8.6625 NaN S 12.2875 NaN S. From table, we see that the Survived column is what we care about, the outcome of every instance in the training example. Let’s explore the variables a little bit:. 65. Se mal femal mal mal femal.

<span class='text_page_counter'>(66)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. In [5]: print(titanic.columns) Index(['Age', 'Cabin', 'Embarked', 'Fare', 'Name', 'Parch', 'PassengerId', 'Pclass', 'Sex', 'SibSp', 'Survived', 'Ticket'], dtype='object') There are a total of 12 variables: * Age: passenger’s age * Cabin: cabin * Embarked: port of embarkation * Fare: fare * Name: passenger’s name * Parch: number of parents/children aboard * PassengerId: passenger’s id (in the dataset) * Pclass: passenger’s class * Sex: passenger’s sex * SibSp: number of siblings/spouses aboard * Survived: 1 for survived and 0 for died * Ticket: ticket number There are two kinds of features: categorical and numerical. Categorical features classify samples into groups. Within categorical values there are nominal, ordinal, ratio and interval based. Numerical features change from one instance to another, including discrete and continuous values. Categorical: * Categorical: Survived, Sex, Embarked * Ordinal: Pclass Numerical: * Continuous: Fare, Age * Discrete: SibSp, Parch In [6]: print(train_set.info()) print('*' * 40) print(test_set.info()) <class 'pandas.core.frame.DataFrame'> RangeIndex: 891 entries, 0 to 890 Data columns (total 12 columns): PassengerId 891 non-null int64 Survived 891 non-null int64 Pclass 891 non-null int64 Name 891 non-null object Sex 891 non-null object Age 714 non-null float64 SibSp 891 non-null int64 Parch 891 non-null int64 Ticket 891 non-null object Fare 891 non-null float64 Cabin 204 non-null object Embarked 889 non-null object dtypes: float64(2), int64(5), object(5) memory usage: 83.6+ KB None **************************************** <class 'pandas.core.frame.DataFrame'> RangeIndex: 418 entries, 0 to 417 Data columns (total 11 columns): PassengerId 418 non-null int64 Pclass 418 non-null int64 Name 418 non-null object Sex 418 non-null object. 66.

<span class='text_page_counter'>(67)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Age 332 non-null float64 SibSp 418 non-null int64 Parch 418 non-null int64 Ticket 418 non-null object Fare 417 non-null float64 Cabin 91 non-null object Embarked 418 non-null object dtypes: float64(2), int64(4), object(5) memory usage: 36.0+ KB None Cabin, Age, and Embarked features contain null values in the training set, while Cabin, Age and Fare have some missing fields in the test set. Also, Ticket is both numeric and alphanumeric, whereas Cabin is alphanumeric. Hence, we’ll also need to correct these fields. In addition, looking at the training set, we see that seven features are integers or floats, six in the case of test set (obviously because there’s no Survived). The other five are strings. Of 891 instances, there are 342 (roughly 38%) that survived: In [7]: train_set['Survived'].value_counts() Out[7]: 0 549 1 342 Name: Survived, dtype: int64 In the dataset, 35% are females: In [8]: train_set['Sex'].value_counts() Out[8]: male 577 female 314 Name: Sex, dtype: int64 In terms of family:. In [9]: print("Number of passengers that did not travel with parents or children:", print("Number of passengers that did not travel with siblings:", train_set[ print("Number of passengers that did not travel with parents, children and Number of passengers that did not travel with parents or children: 678 Number of passengers that did not travel with siblings: 608 Number of passengers that did not travel with parents, children and siblings 537 A more detailed look at the data: In [10]: train_set.describe(). 67.

<span class='text_page_counter'>(68)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Out[10]: count mean std min 25% 50% 75% max. PassengerId 891.000000 446.000000 257.353842 1.000000 223.500000 446.000000 668.500000 891.000000. count mean std min 25% 50% 75% max. Parch 891.000000 0.381594 0.806057 0.000000 0.000000 0.000000 0.000000 6.000000. Survived 891.000000 0.383838 0.486592 0.000000 0.000000 0.000000 1.000000 1.000000. Pclass 891.000000 2.308642 0.836071 1.000000 2.000000 3.000000 3.000000 3.000000. Age 714.000000 29.699118 14.526497 0.420000 20.125000 28.000000 38.000000 80.000000. SibSp 891.000000 0.523008 1.102743 0.000000 0.000000 0.000000 1.000000 8.000000. \. Fare 891.000000 32.204208 49.693429 0.000000 7.910400 14.454200 31.000000 512.329200. In [11]: # Include objects train_set.describe(include=['O']) Out[11]: count unique top freq. Name 891 891 Jerwan, Mrs. Amin S (Marie Marthe Thuillard) 1. Embarked count 889 unique 3 top S freq 644 In [22]: train_set['Embarked'].value_counts().plot( kind='bar', legend=True, grid=None) plt.xticks(fontsize=15, rotation=0) plt.yticks(fontsize=15) plt.show(). 68. Sex 891 2 male 577. Ticket 891 681 347082 7. Cabi 20 14 B96 B9.

<span class='text_page_counter'>(69)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Compute the standard correlation coefficient between every pair of attributes: In [13]: train_set.corr() Out[13]: PassengerId Survived Pclass Age SibSp Parch Fare. PassengerId 1.000000 -0.005007 -0.035144 0.036847 -0.057527 -0.001652 0.012658. Survived -0.005007 1.000000 -0.338481 -0.077221 -0.035322 0.081629 0.257307. Fare PassengerId 0.012658 Survived 0.257307 Pclass -0.549500 Age 0.096067 SibSp 0.159651 Parch 0.216225 Fare 1.000000. 69. Pclass -0.035144 -0.338481 1.000000 -0.369226 0.083081 0.018443 -0.549500. Age SibSp Parch 0.036847 -0.057527 -0.001652 -0.077221 -0.035322 0.081629 -0.369226 0.083081 0.018443 1.000000 -0.308247 -0.189119 -0.308247 1.000000 0.414838 -0.189119 0.414838 1.000000 0.096067 0.159651 0.216225.

<span class='text_page_counter'>(70)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 1.2.3. Assumptions:. After exploring the data a little bit, we are more confident as to what predictions to make and what assumptions to hold. Possible deductions we can get from the data: - The number of parents or children a person went with probably correlated with the survival rate. That made sense because naturally women and children were prioritized to use the emergency boats. - Fare and passenger’s class also correlated probably because the better a class is, the closer to emergency exit a person is - PassengerId is unlikely to contribute to a person’s survival so we might as well drop that field - It’s possible that women were more likely to survive Now let’s set up some pivot tables to confirm/deny our assumptions. We can do so with non-empty values such as Sex, Pclass and SibSp, Parch fields. From the correlation table above, it’s clear that Pclass is negatively correlated with Survived, but we can see it in more detail: In [14]: train_set.groupby('Pclass').agg({'Survived': np.average}) Out[14]:. Survived Pclass 1 2 3. 0.629630 0.472826 0.242363. Now it’s clear that 62% of people in the first class survived while only 24% of people in the third did. In [15]: train_set.groupby('Sex').agg({'Survived': np.average}) Out[15]:. Survived Sex female male. 0.742038 0.188908. Yup, 74% of female survived. Our assumption is correct!. In [16]: train_set.groupby('SibSp').agg({'Survived': np.average}).sort_values(by='S Out[16]:. Survived SibSp 1 2 0 3 4 5 8. 0.535885 0.464286 0.345395 0.250000 0.166667 0.000000 0.000000. People with one sibling survived more than others.. In [17]: train_set.groupby('Parch').agg({'Survived': np.average}).sort_values(by='S. 70.

<span class='text_page_counter'>(71)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Out[17]:. Survived Parch 3 1 2 0 5 4 6. 0.600000 0.550847 0.500000 0.343658 0.200000 0.000000 0.000000. Look like people who traveled with family also survived more. In [18]: train_set.groupby('Pclass').agg({'Parch': np.average}) Out[18]:. Parch Pclass 1 2 3. 0.356481 0.380435 0.393075. In [23]: plt.subplot(1, 2, 1) train_set[train_set['Survived'] == 1]['Age'].hist(bins=25, figsize=(15, 5) plt.title('Survived = 1', fontsize=15) plt.xticks(fontsize=12) plt.yticks(fontsize=12). plt.subplot(1, 2, 2) train_set[train_set['Survived'] == 0]['Age'].hist(bins=25, figsize=(15, 5) plt.title('Survived = 0', fontsize=15) plt.xticks(fontsize=12) plt.yticks(fontsize=12) plt.tight_layout() plt.show(). 71.

<span class='text_page_counter'>(72)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Among those that survived, the majority lay in young children (age less than 5) and adults (25-30 years old). Large number of 15-25 year-olds did not survived. Therefore, age plays an important factor here.. 1.3. Data cleaning:. After tinkering with data to build intuition, hold and verify assumptions, we will now move forward to the data cleaning process. As shown from the steps above, the dataset has a lot of missing values and confusing entries so there must be a way to handle all that riddles to prepare data for machine learning training. Change Sex into 1 or 0: Because machine learning algorithms don’t work well with strings (except for when we are doing natural language processing or text mining), we need to come up with a way to translate all those alphanumeric fields into numbers or vectors. The first one we’ll start with is sex. One way we could do this is by setting all males to 1 and females to 0. In [223]: def encode_sex(row): row['Sex'] = 1 if row['Sex'] == 'male' else 0 return row. titanic_df = titanic.copy() titanic_df = titanic_df.apply(encode_sex, axis=1) titanic_df.head() Out[223]: 0 1 2 3 4. Age Cabin Embarked 22.0 NaN S 38.0 C85 C 26.0 NaN S 35.0 C123 S 35.0 NaN S. 0 1 2 3 4. Name Braund, Mr. Owen Harris Cumings, Mrs. John Bradley (Florence Briggs Th... Heikkinen, Miss. Laina Futrelle, Mrs. Jacques Heath (Lily May Peel) Allen, Mr. William Henry. 0 1 2 3 4. Pclass 3 1 3 1 3. Sex 1 0 0 0 1. SibSp 1 1 0 1 0. Fare 7.2500 71.2833 7.9250 53.1000 8.0500. Survived 0.0 1.0 1.0 1.0 0.0. \. Ticket A/5 21171 PC 17599 STON/O2. 3101282 113803 373450. In [224]: # let's split the labels from the training set train_df_labels = titanic_df[:891]["Survived"].copy(). 72. Parch 0 0 0 0 0. PassengerId 1 2 3 4 5.

<span class='text_page_counter'>(73)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. titanic_df = titanic_df.drop("Survived", axis=1) titanic_df.head() Out[224]: 0 1 2 3 4. Age Cabin Embarked 22.0 NaN S 38.0 C85 C 26.0 NaN S 35.0 C123 S 35.0 NaN S. 0 1 2 3 4. Name Braund, Mr. Owen Harris Cumings, Mrs. John Bradley (Florence Briggs Th... Heikkinen, Miss. Laina Futrelle, Mrs. Jacques Heath (Lily May Peel) Allen, Mr. William Henry. 0 1 2 3 4. Pclass 3 1 3 1 3. Sex 1 0 0 0 1. SibSp 1 1 0 1 0. Fare 7.2500 71.2833 7.9250 53.1000 8.0500. \. Ticket A/5 21171 PC 17599 STON/O2. 3101282 113803 373450. In [225]: train_df_labels.head() Out[225]: 0 0.0 1 1.0 2 1.0 3 1.0 4 0.0 Name: Survived, dtype: float64 Extracting titles from a person’s name In [226]: title_dict = { "Capt": "Officer", "Col": "Officer", "Major": "Officer", "Jonkheer": "Royalty", "Don": "Royalty", "Sir": "Royalty", "Dr": "Officer", "Rev": "Officer", "the Countess": "Royalty", "Dona": "Royalty", "Mme": "Mrs", "Mlle": "Miss", "Ms": "Mrs",. 73. Parch 0 0 0 0 0. PassengerId 1 2 3 4 5.

<span class='text_page_counter'>(74)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. "Mr": "Mr", "Mrs": "Mrs", "Miss": "Miss", "Master": "Master", "Lady": "Royalty" } titles = list(set(title_dict.values())). def extract_title(row): full_name = row['Name'] title = full_name.split(',')[1].split('.')[0].strip() # all titles are set to 0 originally for tit in titles: row[tit] = 0 # except for one row[title_dict[title]] = 1 return row titanic_df = titanic_df.apply(extract_title, axis=1) Categorizing cabins: In [227]: # apparently the Cabin's name starts with a letter # so we'll see how many letters there are cabins = set() for cabin in titanic_df['Cabin']: if isinstance(cabin, str): cabins.add(str(cabin)[0]) print(cabins) {'T', 'C', 'E', 'G', 'D', 'A', 'F', 'B'} Look like there are 8 cabins in total. Let’s turn the alphanumeric Cabin field to different columns of 1s and 0s. In [228]: cabins = list(cabins). def set_cabin_labels(row): for c in cabins: row['Cabin_' + c] = 0 if isinstance(row['Cabin'], str): label = row['Cabin'][0] row['Cabin_' + label] = 1 return row. 74.

<span class='text_page_counter'>(75)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. titanic_df = titanic_df.apply(set_cabin_labels, axis=1) Categorizing embarked: Same as cabins and title, we will just translate S-C-Q Embarked field into a 1x3 vector: In [229]: def set_embarked_label(row): for c in 'SCQ': row['Embarked_' + c] = 0 if isinstance(row['Embarked'], str): row['Embarked_' + row['Embarked']] = 1 return row. titanic_df = titanic_df.apply(set_embarked_label, axis=1) Drop unnessary fields: We could now drop the Name, Embarked, PassengerId and Cabin field:. In [230]: titanic_df = titanic_df.drop(["Name", "Embarked", "Cabin", "PassengerId", Filling missing ages: In [245]: # fill every missing age with the median titanic_df['Age'] = titanic_df['Age'].fillna(titanic_df.Age.mean()) Combining features: In [248]: # We could combine SibSp and Parch features into one titanic_df["FamilySize"] = titanic_df["SibSp"] + titanic_df["Parch"] titanic_df = titanic_df.drop(["SibSp", "Parch"], axis=1) titanic_df.head() Out[248]: 0 1 2 3 4. 0 1 2 3 4. Age 22.0 38.0 26.0 35.0 35.0. Fare 7.2500 71.2833 7.9250 53.1000 8.0500. ... ... ... ... ... .... Pclass 3 1 3 1 3. Cabin_E 0 0 0 0 0. Sex 1 0 0 0 1. Cabin_G 0 0 0 0 0. 75. Mr 1 0 0 0 1. Royalty 0 0 0 0 0. Cabin_D 0 0 0 0 0. Miss 0 0 1 0 0 Cabin_A 0 0 0 0 0. Mrs 0 1 0 1 0. Master 0 0 0 0 0. Cabin_F 0 0 0 0 0. Officer 0 0 0 0 0. Cabin_B 0 0 0 0 0. \. \.

<span class='text_page_counter'>(76)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 0 1 2 3 4. Embarked_S 1 0 1 1 1. Embarked_C 0 1 0 0 0. Embarked_Q 0 0 0 0 0. FamilySize 1 1 0 1 0. [5 rows x 22 columns] One last step: filling missing fare In [253]: titanic_df["Fare"] = titanic_df["Fare"].fillna(titanic_df.Age.mean()) And with all that cleaning data, we are finally ready to move on to the next stage: training model to predict survival rate.. 1.4. Training model:. 1.4.1. Split the dataset, again:. Remember in the previous step we combined both the training and test sets into one to do some data cleaning. Now we’ll have to split them again In [290]: train_df, test_df = titanic_df[:891], titanic_df[891:] The first thing we need to do is to measure our performance. We will use the most simple binary classification model - logistic regression. Logistic regression is defined as the following: Suppose we have a vector x(i) representing the list of features in the example i, our goal is to calculate the prediction by using a sigmoid function defined as: hθ (x) = g(θT x(i) ) =. 1 1+. (i) e−θT x. with θ is a parameter vector θ = (θ0 , θ1 , ..., θn ) to patameterize n features represented in vector x(i) . The result predicts an instance as positive if hθ (x) ≥ 0.5 and negative if hθ (x) < 0.5 In [295]: X_train, y_train = train_df.as_matrix(), train_df_labels log_reg = LogisticRegression(random_state=42) log_reg.fit(X_train, y_train). Out[295]: LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=Tr intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1, penalty='l2', random_state=42, solver='liblinear', tol=0.0001, verbose=0, warm_start=False) Now that we have trained the model, we’ll see the accuracy rate: In [305]: skfolds = StratifiedKFold(n_splits=3, random_state=42). def measure_skfolds(X_train, y_train, model):. 76.

<span class='text_page_counter'>(77)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. for train_idx, test_idx in skfolds.split(X_train, y_train): clone_clf = clone(model) X_train_folds = X_train[train_idx] y_train_folds = (y_train[train_idx]) X_test_fold = X_train[test_idx] y_test_fold = (y_train[test_idx]) clone_clf.fit(X_train_folds, y_train_folds) y_pred = clone_clf.predict(X_test_fold) n_correct = sum(y_pred == y_test_fold) print(n_correct / len(y_pred)). measure_skfolds(X_train, y_train, log_reg) 0.801346801347 0.818181818182 0.838383838384 The StratifiedKFold class performs stratified sampling to produce folds that contain a representative ratio of each class. At each iteration, the code creates a clone of the classifier, trains that clone on the training folds, and makes predictions on the test fold. Then it counts the number of correct predictions and outputs the ratio of correct predictions. From three iterations, it seems that the accuracy rate is around 81%, not a high and not a low number. Let’s now try a more powerful model: In [311]: from sklearn.linear_model import SGDClassifier from sklearn.svm import SVC sgd_clf = SGDClassifier(random_state=42) sgd_clf.fit(X_train, y_train) svc_clf = SVC(kernel='linear') svc_clf.fit(X_train, y_train) Out[311]: SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0, decision_function_shape=None, degree=3, gamma='auto', kernel='linear', max_iter=-1, probability=False, random_state=None, shrinking=True, tol=0.001, verbose=False) In [314]: print(measure_skfolds(X_train, y_train, sgd_clf)) print(measure_skfolds(X_train, y_train, svc_clf)) 0.427609427609 0.673400673401 0.626262626263 None 0.804713804714. 77.

<span class='text_page_counter'>(78)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 0.824915824916 0.835016835017 None . . . So the Stochastic Gradient Descent model performs worse while Support Vector Machine performs roughly the same. For the sake of simplicity, we will not get into the mathematical details of these two classifiers. Instead, we will focus on how to improve our model. One thing we could try is using GridSearchCV to search for the best combinations of hyperparameters in our model. A hyperparameter is a parameter on a higher abstraction level to configure a model such as the number of iterations, regularizers,. . . In [317]: from sklearn.model_selection import GridSearchCV # let's just use the logistic regression classifier param_grid = [ { 'C': [0.01, 0.03, 0.1, 0.3, 1, 10, 30], 'dual': [False], 'max_iter': [100, 150, 200, 250], 'solver': ['newton-cg', 'lbfgs', 'liblinear', 'sag'] }, ] grid_search = GridSearchCV(log_reg, param_grid, cv=5, scoring='accuracy') grid_search.fit(X_train, y_train). /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). 78.

<span class='text_page_counter'>(79)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). 79.

<span class='text_page_counter'>(80)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). 80.

<span class='text_page_counter'>(81)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). 81.

<span class='text_page_counter'>(82)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). 82.

<span class='text_page_counter'>(83)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). 83.

<span class='text_page_counter'>(84)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning) /Users/tuvttran/anaconda3/envs/python3/lib/python3.6/site-packages/sklearn/linear_m "the coef_ did not converge", ConvergenceWarning). Out[317]: GridSearchCV(cv=5, error_score='raise', estimator=LogisticRegression(C=1.0, class_weight=None, dual=False, intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1, penalty='l2', random_state=42, solver='liblinear', tol=0.0001, verbose=0, warm_start=False), fit_params={}, iid=True, n_jobs=1, param_grid=[{'C': [0.01, 0.03, 0.1, 0.3, 1, 10, 30], 'dual': [Fals pre_dispatch='2*n_jobs', refit=True, return_train_score=True, scoring='accuracy', verbose=0) In [318]: grid_search.best_params_ Out[318]: {'C': 1, 'dual': False, 'max_iter': 100, 'solver': 'newton-cg'} In [319]: best_log_reg = grid_search.best_estimator_ measure_skfolds(X_train, y_train, best_log_reg) 0.804713804714 0.818181818182 0.835016835017 Looks like 83% is our upper bound for accuracy. There are many reasons that the accuracy is not high (> 90%). One of the possibilities is that we don’t have much data so our model is likely to overfit the training set. Or our choice of features is not optimized and we could add more features, delete more features,. . . In the real world, 75% of data science is all about crawling and. 84.

<span class='text_page_counter'>(85)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. cleaning data rather than actual training. Therefore, there are occasions that a data scientist spends month trying to clean all the data, select the best features by running different algorithms. . . For this article, we only use three models and from the result we see that the most optimized one is Logistic Regression. To expand upon this, there are many more classifier models we could use such as neural networks and naive Bayes. One last step is to run our algorithm against the test set: In [322]: test_predictions = best_log_reg.predict(test_df.as_matrix()) test_set["Survived"] = test_predictions test_set.head() Out[322]:. 1.5. 0 1 2 3 4. PassengerId 892 893 894 895 896. Pclass 3 3 2 3 3. 0 1 2 3 4. Age 34.5 47.0 62.0 27.0 22.0. Parch 0 0 0 0 1. SibSp 0 1 0 0 1. Name Kelly, Mr. James Wilkes, Mrs. James (Ellen Needs) Myles, Mr. Thomas Francis Wirz, Mr. Albert Hirvonen, Mrs. Alexander (Helga E Lindqvist) Ticket 330911 363272 240276 315154 3101298. Fare Cabin Embarked 7.8292 NaN Q 7.0000 NaN S 9.6875 NaN Q 8.6625 NaN S 12.2875 NaN S. Survived 0.0 1.0 0.0 0.0 1.0. Conclusion:. To sum up, in this article we have explored how to gather, clean and train data with different models and algorithms. We also ran cross validation to find the best combinations of hyperparameters using sklearn’s GridSearchCV. In practice, the whole data science process is a lot more complicated and tedious and this tutorial only shows a fraction of it. I wish you the best on your journey to explore data science and machine learning! 1.5.1. References:. • An interactive data science tutorial: • Titanic Data Science Solutions: • Hands-on Machine Learning with Scikit-learn 85. and. Tensorflow:. m fem m m fem.

<span class='text_page_counter'>(86)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Exploring Runge-Kutta formulas with a computer algebra system Alasdair McAndrew College of Engineering and Science Victoria University PO Box 14428, Melbourne 8001 Victoria, Australia. Abstract Runge-Kutta formulas are some of the workhorses of numerical methods for solving differential equations. However, they are extremely difficult to generate; the algebra involved can be very complicated indeed, and so their derivation is not included in undergraduate numerical texts. It is now standard, following with work of Butcher in the 1960’s and 70’s, to use the combinatorial theory of trees to simplify the algebra. More recently, however, several authors have shown that it is quite feasible to use a computer algebra system to generate Runge-Kutta formulas. This article shows that, using a computer-based approach, the formulas can be generated with very elementary means, using only the tools of elementary calculus and an open-source computer system to handle the messy algebra. This approach brings a formerly difficult operation into the realm of undergraduate mathematics.. 1. Introduction. Unless you are teaching an advanced course in numerical analysis, you are not likely to spend much time discussing Runge-Kutta methods for differential equations. You may derive some simple methods (Euler, Heun), and state without proof the standard fourth-order Runge-Kutta method. You will almost certainly not derive this method, and for very good reason—the algebra involved is frighteningly complicated. One text [9] takes at least four pages of dense algebra to produce the result. As part of intense decades of research into these methods, Butcher [2, 1, 6] developed some highly sophisticated techniques which showed how the equations which characterize these methods are not random, as they at first appear, but are intimately related to the theory of “rooted trees”. A tree is a graph (in the combinatorial sense) which is connected and contains no circuits, and rooted means that one vertex is specified as the “root”. Although there had been some indications before Butcher that rooted trees and Runge-Kutta conditions were connected, it was Butcher’s work that brought this theory into fruition, and on which much of the current theory of Runge-Kutta conditions is based.. 86.

<span class='text_page_counter'>(87)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. However, the use of a computer algebra system means it is now quite possible to look at RungeKutta conditions anew: in particular to restrict the mathematics to elementary undergraduate calculus and algebra. In particular, we can 1. Derive the equations which characterize Runge-Kutta methods. 2. Use the technique of Gröbner bases to simplify the equations (which are all polynomial). 3. Solve the equations, either in a completely general manner, or more particularly with specified values for some of the variables. Some of this has previously been done [4]. However, we provide a somewhat different approach: 1. We use only open-source software, so that anybody can experiment and verify our results. 2. We show how to determine Runge-Kutta methods for autonomous equations. 3. We show how to develop embedded formulas, which consist of two methods of different orders and which share the same coefficients. These are the currently preferred methods. We are concerned with finding the solution to the initial value problem dy = f (x, y), dx. y(x0 ) = y0. where the function f , and the initial values (x0 , y0 ) are given. A numerical solution consists of a sequence of ordered pairs (xk , yk ), where yk is an approximation to the exact value y(xk ). One way is to use the Taylor expansion of y(x), using y 0 = f (x, y) y 00 = fx + fy. dy = fx + fy f dx. dy dx = fxx + fyx f + fy fx + (fxy + fyy f + fy fy )f = fxx + 2fxy f + fx fy + fyy (f )2 + (fy )2 f. y 000 = (fx + fy f )x + (fx + fy f )y. and then for a suitably small value of h, given (xk , yk ) and with xk+1 = xk + h compute an approximation to yk+1 ≈ y(xk + h) to the exact value y(xk+1 ). However, this requires the derivatives of f , which in many cases may have to be computed using an approximation, thus introducing a new source of errors. The insight of Runge1 and of Kutta2 , was to realize that as the first derivative of y was equal to f , so other derivatives could be computed by judicious nesting. For example, suppose we truncate the expansion of the Taylor series expansion of f after the first derivative: (1). f (x + h, y + k) ≈ f + hfx + kfy . 1 2. Carl David Tolmé Runge, 1856–1927 Martin Wilhelm Kutta, 1867–1944. 87.

<span class='text_page_counter'>(88)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Also, truncate the Taylor series for y after the second derivative: y(x + h) ≈ y + hf +. h2 (fx + fy f ). 2. (2). Note that the expression in parentheses on the right of (2) is very close to that on the right of (1), excepting a term of f . But this can be inserted simply by writing (2) as h h y(x + h) ≈ y + f + (f + hfx + hfy f ). 2 2. (3). Comparing the final term with (1) we can write h h y(x + h) ≈ y + f + f (x + h, y + hf ). 2 2 This can be written as a sequence of steps, starting with yn ≈ y(xn ) and with xn+1 = xn + h:. (4). k1 = f (x, y) k2 = f (x + h, y + hk1 ) h yn+1 = yn + (k1 + k2 ). 2 This is an example of a second-order Runge-Kutta formula, and is equal to a second-order Taylor approximation, but without computing any of the derivatives of f . In general, an n-th order RungeKutta formula has the form: k1 = f (xn , yn ) k2 = f (x + c2 h, yn + a21 hk1 ) . k3 .= f (x + c3 h, yn + h(a31 k1 + a32 k2 )) . km = f (x + cm h, yn + h(am1 k1 + am2 k2 + · · · + am,m−1 km−1 )) and then yn+1 = yn + h(b1 k1 + b2 k2 + · · · + bm km ). It is customary to write all the coefficients in a Butcher array: 0 c2 a21 c3 a31 a32 .. . cm am1 am2 · · · am,m−1 b1 b2 · · · bm−1 bm. 88.

<span class='text_page_counter'>(89)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. These particular Runge-Kutta methods are called explicit methods, where at stage i the value ki is explicitly defined in terms of previously computed values. The above second order method could be written as 0 1 1 1 2. 1 2. A very popular fourth-order method (sometimes called “the Runge-Kutta method”) is given by the array 0 1 2 1 2. 1 2. 0 12 1 0 0 1 1 6. 2. 1 3. 1 3. 1 6. Use of Computer Algebra Systems: third-order methods. Before we launch into the use of a CAS, consider a third-order system: k1 = f (x, y) k2 = f (x + c2 h, y + a21 hk1 ) k3 = f (x + c3 h, y + a31 hk1 + a32 hk2 ) and yn+1 = yn + h(b1 k1 + b2 k2 + b3 k3 ) and which is to be equivalent to the third-order Taylor polynomial y(xn + h) ≈ y + hf +. h2 h3 (fx + fy f ) + (fxx + 2fxy f + fx fy + fyy (f )2 + (fy )2 f ). 2 6. In order to find appropriate coefficients, the expressions for each of the ki values need to be expanded up to and including the second derivatives; thus: k1 = f (x, y) h2 2 (c2 fxx + 2c2 a21 k1 fxy + (a32 k1 )2 fyy ) 2 k3 = f (x, y) + h(c3 fx + (a31 k1 + a32 k2 )fy ) h2 + (c22 fxx + 2c2 (a31 k1 + a32 k2 )fxy + (a31 k1 + a32 k2 )2 fyy ) 2 k2 = f (x, y) + h(c2 fx + a21 k1 fy ) +. Note that k3 above is expressed in terms of k2 ; this means that the expression for k2 must be substituted into k3 wherever it occurs, so that the final expressions for each of the ki are written using only f and its derivatives, and h.. 89.

<span class='text_page_counter'>(90)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. To equate the Taylor polynomial with the Runge-Kutta values for yn+1 , we must have y + hf +. h2 h3 (fx + fy f ) + (fxx + 2fxy f + fx fy + fyy (f )2 + (fy )2 f ) 2 6 = y + h(b1 k1 + b2 k2 + b3 k3 ). or that h h2 b1 k1 + b2 k2 + b3 k3 = f + (fx + fy f ) + (fxx + 2fxy f + fx fy + fyy (f )2 + (fy )2 f ). 2 6. (5). We thus need to find values of all the unknown coefficients (the a, b and c values), for which h h2 b1 k1 + b2 k2 + b3 k3 − f − (fx + fy f ) − (fxx + 2fxy f + fx fy + fyy (f )2 + (fy )2 f ) = 0. 2 6 Collecting all the terms together, and working through all the algebra to expand k2 and k3 fully, we end up with .    a232 b3 a231 b3 a221 b2 1 1 2 2 + a31 a32 b3 + + − fyy h f + a21 a32 b3 − fy2 h2 f 2 2 2 6 6   1 + a32 b3 c3 + a31 b3 c3 + a21 b2 c2 − fxy h2 f 3   1 + a32 b3 + a31 b3 + a21 b2 − fy hf + (b3 + b2 + b1 − 1) f 2    2  1 b3 c3 b2 c22 1 2 + a32 b3 c2 − fx fy h + + − fxx h2 6 2 2 6   1 + b3 c3 + b2 c2 − fx h 2 = 0.. (6). Once this has been done, the values we want are the solutions to the non-linear equations: a232 b3 + 2a31 a32 b3 + a231 b3 + a221 b2 a21 a32 b3 a32 b3 c3 + a31 b3 c3 + a21 b2 c2 a32 b3 + a31 b3 + a21 b2 b 3 + b2 + b1 a32 b3 c2 2 b3 c3 + b2 c22 b3 c3 + b2 c2. = 1/3 = 1/6 = 1/3 = 1/2 =1 = 1/6 = 1/3 = 1/2. It can be seen—even without attempting to solve these equations—that the algebra involved is extremely involved, messy, and without any apparent order. Given the apparent lack of structure to. 90.

<span class='text_page_counter'>(91)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. these equations, it is all the more remarkable that Butcher was able to relate these equations to a different area of mathematics, and hence bring some order to the chaos. Our approach, though, will be to simply create the equations from scratch, and solve them, using a computer algebra system. Our choice will be the open-source Sage [10] to perform the algebraic computations. However, much of the initial calculus computations will devolve to the open-source system Maxima [7], which is the current descendant of the venerable system Macsyma; and which has very powerful calculus and algebra functionality. As Sage includes Maxima within it, we can use Maxima initially to create the derivatives and the functions, and use the algebraic power of Sage to solve the equations. We will present our work with monospaced input and typeset output, similar to the appearance of using Sage in a browser-based “notebook” [3] and with Maxima cells.. To start, we need to create a formal function f and its derivatives. In Sage, objects maintain their types, so in a variable assignment such as “z = f.diff(x)”, assuming f to be a function previously defined, the result z will be either a Sage object or a Maxima object depending on the type of f. We thus start by introducing three Maxima variables: x = maxima(’x’) y = maxima(’y’) f = maxima(’f’) Now each of these variables will automatically have access to the Maxima sub-system, and so we can create the derivatives. In order to prevent unnecessary high derivatives of y(x), we shall replace y 0 with f as soon as it appears. y.depends(x) f.depends([x,y]) f1 = f.diff(x).subst("diff(y,x)=f") f2 = f1.diff(x).subst("diff(y,x)=f") f3 = f2.diff(x).subst("diff(y,x)=f") Sage doesn’t automatically display the results of a variable assignment, but we can check out the first two: f1,f2 .  ∂ ∂ f f + f, ∂y ∂x   2         ∂ ∂2 ∂ ∂ ∂ ∂2 ∂2 f f f + f + f f f + f + f +f f ∂ y2 ∂ x∂ y ∂y ∂y ∂x ∂ x2 ∂ x∂ y In order to make the algebra more manageable, we shall subsitute each derivative with a variable name, first introducing those variables into the namespace. Sage is based on the programming language Python, in which any variable must be named before it can be used. These variables will accrue their appropriate types later.. 91.

<span class='text_page_counter'>(92)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. var(’h,F,Fx,Fy,Fxx,Fxy,Fyy,Fxxx,Fxxy,Fxyy,Fyyy,a21,\ a31,a32,a41,a42,a43,b1,b2,b3,b4,c2,c3,c4,’) dsubs = " ’diff(f,x,3)=Fxxx, ’diff(f,x,2,y,1)=Fxxy,\ ’diff(f,x,1,y,2)=Fxyy,’diff(f,y,3)=Fyyy,\ ’diff(f,x,2)=Fxx, ’diff(f,y,2)=Fyy,\ ’diff(f,x,1,y,1)=Fxy,’diff(f,x,1)=Fx,\ ’diff(f,y,1)=Fy, f=F" F1 = f1.subst(dsubs) F2 = f2.subst(dsubs) F3 = f3.subst(dsubs) As before, their values can be checked: F1, F2, F3 Fy F + Fx F (Fyy F + Fxy) + Fy (Fy F + Fx ) + Fxy F + Fxx F (F (Fyyy F + Fxyy) + Fyy (Fy F + Fx ) + Fxyy F + Fxxy) + Fy (F (Fyy F + Fxy) + Fy (Fy F + Fx ) + Fxy F + Fxx ) + 2 (Fy F + Fx ) (Fyy F + Fxy) + Fxy (Fy F + Fx ) + F (Fxyy F + Fxxy) + Fxxy F + Fxxx Now we introduce the Taylor polynomial up to the third derivative (this is for a third-order method), and this corresponds to the right hand side of equation (5): T = F + h/2*F1 + h^2/6*F2; T h2 (F (Fyy F + Fxy) + Fy (Fy F + Fx ) + Fxy F + Fxx ) h (Fy F + Fx ) + +F 6 2 In order to compute the ki values, we need a Taylor series expansion up to the second derivative: f (x + a, y + b) = f (x, y) + afx + bfy +.  1 2 a fxx + 2abfxy + b2 fyy 2. where the subscripts represent the usual partial derivatives. Given the above substitutions, we will call this expansion Tay(a, b). Since we are at the moment dealing with Maxima variables, we will define Tay as a Maxima function: Tay = maxima.function(’a,b’,’F+Fx*a+Fy*b\ +(Fxx*a^2+2*Fxy*a*b+Fyy*b^2)/2’) Since the ki values are nested, we do not want the powers of h increasing: we are only interested in coefficients for which the powers of h are 2 or less. Maxima has a handy trick here: maxima("tellrat(h^3)") maxima("algebraic:true"). 92.

<span class='text_page_counter'>(93)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. This means that for every rational expansion, all powers of h that are three or more will be set equal to zero. Now we can create the ki values: k1 = Tay(0, 0) k2 = Tay(c2*h, a21*h*k1) k3 = Tay(c3*h, h*a31*k1 + h*a32*k2) (The expressions, certainly for k3 , are too long to display). Now we can create the left hand side of equation (5): RK = b1*k1 + b2*k2 + b3*k3 The next step is to create the expression on the left hand side of equation (6); we can do this by collecting all the terms involving F and its derivatives. The Maxima command “collectterms” provides just this functionality. d = (T-RK).ratexpand().collectterms(Fyy,Fxy,Fxx,Fy,Fx,F,h) This expression is too long to print, but we can extract the coefficients from it, which are the equations we want: eqs = [xx.inpart(1) for xx in d.args()] eqs  a32 2 b3 a31 2 b3 a21 2 b2 1 1 − − a31 a32 b3 − − + , − a21 a32 b3 , 2 2 2 6 6 1 − a32 b3 c3 − a31 b3 c3 − a21 b2 c2 + , −a32 b3 − a31 b3 − a21 b2 3  1 1 b3 c3 2 b2 c2 2 1 1 + , −b3 − b2 − b1 + 1, − a32 b3 c2 , − − + , −b3 c3 − b2 c2 + 2 6 2 2 6 2. Each expression in this list may be considered as the left hand side of an equation which will be set equal to zero. These expressions are all Maxima objects, but to access the algebraic power of Sage, they need to be lifted out of the Maxima sub-system. We will use the Sage “repr” command, which produces a string representation of an object, and we will evaluate those strings into Sage expressions. eqs2 = [sage_eval(repr(xx),locals=locals()) for xx in eqs] In Sage an expression can be entered directly in the solve command, in which it is automatically assumed to be an equation set equal to zero. These equations can be solved in terms of c2 and c3 : sols = solve(eqs2,[a21,a31,a32,b1,b2,b3]) sols  3 (c22 − c2 )c3 + c23 c2 c3 − c23 3 (2 c2 − 1)c3 − 3 c2 + 2 a21 = c2 , a31 = , a = , b1 = , 32 2 2 3 c2 − 2 c2 3 c2 − 2 c2 6 c2 c3  3 c3 − 2 3 c2 − 2 b2 = − , b3 = 6 (c22 − c2 c3 ) 6 (c2 c3 − c23 ). These are standard expressions, and are found, for example, in Butcher [1]. In general, Sage solutions are given as a list of lists. In our case there is only one solution, which can be isolated with. 93.

<span class='text_page_counter'>(94)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. sols = sols[0] given that in Sage lists are indexed starting at zero. Note that the first item tells us that a21 = c2 . Adding the next two items shows a similar relation for c3 : (sols[1] + sols[2]).simplify_rational() a31 + a32 = c3 It can in fact be shown that for any Runge-Kutta method, each ck value is equal to the sum of the corresponding aki values: ck = ak1 + ak2 + · · · ak,k−1 . This is known as the row-sum condition, and may be assumed for any computation with Runge-Kutta coefficients. We can now find particular solutions by substituting values for c2 and c3 (such that the denominators are all non-zero, which means that c2 and c3 must be different), for example: [xx.subs(c2=-1,c3=1) for xx in sols]            7 2 2 1 5 a21 = (−1) , a31 = , a32 = − , b1 = , b2 = − , b3 = 5 5 3 12 12 Two other substitutions are:. [xx.subs(c2=1/2,c3=1) for xx in sols]          1 1 2 1 a21 = , a31 = (−1) , a32 = 2, b1 = , b2 = , b3 = 2 6 3 6 [xx.subs(c2=1/2,c3=1) for xx in sols]          1 2 1 3 a21 = , a31 = 0, a32 = , b1 = , b2 = 0, b3 = 3 3 4 4 These last two can be written into Butcher arrays as follows: 0 1 2. 0 1 2. 1 −1 2 1 6. 2 3. , 1 6. 1 3 2 3. 1 3. 0. 2 3. 1 3. 0. 3 4. and are known as Kutta’s third-order method and Heun’s third-order method respectively.. 94.

<span class='text_page_counter'>(95)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. 3. Fourth-order methods. Having set up the ground work, fourth-order methods can be found similarly; with suitable changes to some of the entries to allow for the higher order. With each of f1, f2, f3, F1, F2, F3 as before, the commands (given with no outputs) will be: maxima("tellrat(h^4)") T = F + h/2*F1 + h^2/6*F2 + h^3/24*F3 Tay = maxima.function(’a,b’,’F+Fx*a+Fy*b\ +(Fxx*a^2+2*Fxy*a*b+Fyy*b^2)/2\ +(Fxxx*a^3+3*Fxxy*a^2*b+3*Fxyy*a*b^2+Fyyy*b^3)/6’) k1 = Tay(0, 0) k2 = Tay(c2*h, a21*h*k1) k3 = Tay(c3*h, h*a31*k1 + h*a32*k2) k4 = Tay(c4*h, h*a41*k1 + h*a42*k2 + h*a43*k3) RK = b1*k1 + b2*k2 + b3*k3 + b4*k4 d = (T-RK).ratexpand()\ .collectterms(Fyyy,Fxyy,Fxxy,Fxxx,Fyy,Fxy,Fxx,Fy,Fx,F,h) eqs = [xx.inpart(1) for xx in d.args()] At this stage, with no simplification, we will have a list of 19 equations. Before attempting to simplify the equations, we first introduce the row-sum condition: eqs2 = [xx.subst("a21=c2,a31=c3-a32,a41=c4-a42-a43").expand()\ .collectterms(b1,b2,b3,b4) for xx in eqs] and transform the set of equations out of Maxima and into Sage: eqss = [sage_eval(repr(xx),locals=locals()) for xx in eqs2] Now we can create a polynomial ring in which all the computations will be done, and in the polynomial ring compute the reduced Gröbner basis of the ideal generated by the equations: R = PolynomialRing(QQ,’a21,a31,a32,a41,a42,a43,b1,b2,b3,b4,c2, ...: c3,c4’,order=’lex’) Id = R.ideal(eqss) ib = Id.interreduced_basis() The “interreduced_basis” command simplifies the 19 equations obtained from the initial computations to a set of eight equations, which is a minimal Gröbner basis in the formal sense that no smaller set can generate the initial polynomial ideal. See for example [11] for an elementary and readable account of Gröbner bases and reduced Gröbner bases. The eight equations thus obtained are. 95.

<span class='text_page_counter'>(96)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. as follows: a32 a43 b4 c2 −. 1 24. a32 b3 c2 + a42 b4 c2 + a43 b4 c3 −. (7.1) 1 6. (7.2). 1 1 a42 b4 c2 c3 − a42 b4 c2 c4 + a43 b4 c23 − a43 b4 c3 c4 − c3 + 6 8 1 1 a43 b4 c2 c3 − a43 b4 c23 − c2 + 6 12 b1 + b2 + b3 + b4 − 1 1 b2 c2 + b3 c3 + b4 c4 − 2 1 1 b3 c2 c3 − b3 c23 + b4 c2 c4 − b4 c24 − c2 + 2 3 1 1 1 1 b4 c2 c3 c4 − b4 c2 c24 − b4 c3 c24 + b4 c34 − c2 c3 + c2 + c3 − 2 3 3 4. (7.3) (7.4) (7.5) (7.6) (7.7) (7.8). As we have seen previously, we may consider each of these expressions as the left hand sides of equations set equal to zero. And this new system of equations can be easily solved in terms of ci . We first note that c4 = 1; although this can be shown analytically, we can easily demonstrate it using our reduced Gröbner basis: (ib*R).reduce(c4-1) 0 The bi values can now be obtained by noting that the last four equations (7.5), (7.6), (7.7), (7.8) are linear in bi : bsols = solve([ib[i].subs(c4=1) for i in [4,5,6,7]],[b1,b2,b3,b4],\ solution_dict=True)[0] bsols = {xx: factor(yy) for xx, yy in bsols.items()} . b2 :. 2 c3 − 1 6 c2 c3 − 2 c2 − 2 c3 + 1 , b1 : , 12 (c2 − c3 )(c2 − 1)c2 12 c2 c3  6 c2 c3 − 4 c2 − 4 c3 + 3 2 c2 − 1 b4 : , b3 : − 12 (c2 − 1)(c3 − 1) 12 (c2 − c3 )(c3 − 1)c3. (Note that in Sage lists the indices start at 0, so that our equation numbers (7.5), (7.6), (7.7), (7.8) correspond to Sage list indices 4, 5, 6, 7.) These are standard results [1]. From these we can use the equations (7.2, (7.3) and (7.4) to compute the aij values: asols = solve([SR(ib[i]).subs(c4=1).subs(bsols) for i in [1,2,3]],\ [a32,a42,a43],solution_dict=True)[0] asols = {xx: factor(yy) for xx, yy in asols.items()}. 96.

<span class='text_page_counter'>(97)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. . a43 :. (2 c2 − 1)(c2 − 1)(c3 − 1) , (6 c2 c3 − 4 c2 − 4 c3 + 3)(c2 − c3 )c3  (4 c23 − c2 − 5 c3 + 2)(c2 − 1) (c2 − c3 )c3 a42 : − , a32 : 2 (6 c2 c3 − 4 c2 − 4 c3 + 3)(c2 − c3 )c2 2 (2 c2 − 1)c2. These values satisfy the first equation (7.1): (asols[a32]*asols[a43]*bsols[b4]*c2).rational_simplify() 1 24 Note that because of the factor c2 − c3 in the denominators of some of these expressions, we cannot substitute equal values for c2 and c3 . In order to develop a fourth-order method for which c2 = c3 we need to go back a few steps: var(’u’) eqss = [sage_eval(repr(xx),locals=locals()).subs(c2=u,c3=u,c4=1) ...: for xx in eqs2] R.<a21,a31,a32,a41,a42,a43,b1,b2,b3,b4,u> = PolynomialRing(QQ) Id = R.ideal(eqss) ib = Id.interreduced_basis(); ib . 1 1 1 2 1 1 a32 a43 − , a32 b3 − , a42 + a43 − 1, b1 − , b2 + b3 − , b4 − , u − 2 6 6 3 6 2. . These can be solved to produce: 1 1 2 u = , b1 = , b2 = r1 , b3 = − r1 , 2 6 3 a42 = 3r1 − 1, a43 = 2 − 3r1 .. 1 b4 = , 6. a32 =. 1 , 2(2 − 3r1 ). These values can be written into the following Butcher array: 0 1 2 1 2. 1 2. 1 0 2 1 0 3r1 − 1 2 − 3r1 1 2 r1 − r1 6 3. 1 6. Putting r1 = 1/3 produces the classic Runge-Kutta fourth-order method.. 97.

<span class='text_page_counter'>(98)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 4. Use of autonomy. Much of the computations in the previous sections can be simplified by noting that we do not in fact need to include the ci values in any equations list, as their values can be determined from the aij values. Since ci only appear in the computation of ki , all the computations can be simplified by considering only differential equations for the form y 0 = f (y) in which f does not depend explicitly on x; such differential equations are said to be autonomous. This leads to greatly simplified forms for the higher derivatives of f : f.depends(y) Create fi and Fi as before, but note the values of Fi : F1, F2, F3 Fy F,. Fyy F 2 + Fy 2 F,. Fyyy F 3 + 4 Fy Fyy F 2 + Fy 3 F. . Since we need not consider any partial derivatives of f which include x, the following commands can be used: maxima("tellrat(h^4)") T = F + h/2*F1 + h^2/6*F2 + h^3/24*F3 Tay = maxima.function(’a,b’,’F+Fy*b+Fyy*b^2/2+Fyyy*b^3/6’) k1 = Tay(0, 0) k2 = Tay(0, a21*h*k1) k3 = Tay(0, h*a31*k1 + h*a32*k2) k4 = Tay(0, h*a41*k1 + h*a42*k2 + h*a43*k3) Note that we need to include an extra dummy variable in the “Tay” function; the systems in their current forms prevent a Maxima function of one variable being used in this way. The next few commands are similar to those above. RK = b1*k1 + b2*k2 + b3*k3 + b4*k4 d = (T-RK).ratexpand().collectterms(Fyyy,Fyy,Fy,F,h) eqs = [xx.inpart(1) for xx in d.args()] eqss = [sage_eval(repr(xx),locals=locals()) for xx in eqs] The equations are still quite long and complicated; as before they can be simplified by introducing the row-sum conditions, and putting c4 = 1: eqs2 = [xx.subs(a31=c3-a32,a41=1-a42-a43).expand() for xx in eqss] to produce:. 98.

<span class='text_page_counter'>(99)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. 1 1 1 1 b2 c32 − b3 c33 − b4 c34 + 6 6 6 24 1 1 1 1 − a32 b3 c22 − a42 b4 c22 − a32 b3 c2 c3 − a43 b4 c23 − a42 b4 c2 c4 − a43 b4 c3 c4 + 2 2 2 6 1 1 1 1 − b2 c22 − b3 c23 − b4 c24 + 2 2 2 6 1 − a32 a43 b4 c2 + 24 1 − a32 b3 c2 − a42 b4 c2 − a43 b4 c3 + 6 1 − b2 c2 − b3 c3 − b4 c4 + 2 − b1 − b2 − b3 − b4 + 1 −. These expressions are not quite the same as the expressions (7.1) to (7.8) from the previous section, but they can be solved similarly as equations set equal to zero: bsols = solve([eqs2[i] for i in [0,2,5,6]],[b1,b2,b3,b4],\ solution_dict=True)[0] asols = solve([eqs2[i].subs(bsols) for i in [1,3,4]],[a32,a42,a43],\ solution_dict=True)[1] to produce the same results as before. For this autonomous approach, there has been no need to simplify a large set of nineteen equations to a smaller set by involving the machinery of Gröbner bases; the equation set was optimally small at the start. To solve these equations with c2 = c3 , we need to be a bit careful; the attempt var(’u’) eqs2 = [xx.subs(a21=u,a31=u-a32,a41=1-a42-a43).expand() ...: for xx in eqss] bsols = solve([eqs2[i] for i in [0,2,5,6]],[b1,b2,b3,b4], ...: solution_dict=True) will not work: as b2 and b3 have the same coefficients in all the equations, the determinant of the matrix of coefficients is zero. So we leave b2 out: bsols = solve([eqs2[i] for i in [0,2,6]],[b1,b3,b4],\ : solution_dict=True)[0] asols = solve([eqs2[i].subs(bsols) for i in [1,3,4]],[a32,a42,a43],\ : solution_dict=True)[0] The results will be expressed in terms of the parameters b2 and u. Substituting b2 = 1/3 and u = 1/2 will produce the standard fourth-order method.. 99.

<span class='text_page_counter'>(100)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 5. Embedded formulas. Many applications now use embedded Runge-Kutta methods, in which two methods share the same coefficients. Generally the order of the methods differs by one, so we might have a fifth order method, from which the coefficients can be used to build a fourth-order method. Then the differences between the results of these methods can be used to adjust the step size h for the next iteration. Methods of order 4(3) and the theory behind them are well known [1, 5], but we can show that it is very easy to construct such a method. Starting with Kutta’s 3/8 method, we need to find coefficients b̂1 , b̂2 , b̂3 , b̂4 , b̂5 so that with the extra stage k5 = f (xn + c5 h, h(b1 k1 + b2 k2 + b3 k3 + b4 k4 )) the value of yn+1 obtained with yn+1 = yn + h(b̂1 k1 + b̂2 k2 + b̂3 k3 + b̂4 k4 + b̂5 k5 ) will be accurate to order three. This is easily done, assuming the autonomous approach. We enter the fourth-order values, and for simplicity we use si in place of b̂i . a21,a31,a32,a41,a42,a43 = 1/3,-1/3,1,1,-1,1 b1,b2,b3,b4 = 1/8,3/8,3/8,1/8 var(’s1,s2,s3,s4,s5’) We set up the third-order conditions as previously, but this time with five stages: T = F + h/2*F1 + h^2/6*F2 maxima("tellrat(h^3)") maxima("algebraic:true") Tay = maxima.function(’a,b’,’F+Fy*b+Fyy*b^2/2’) k1 k2 k3 k4 k5 RK. = = = = = =. Tay(0, 0) Tay(0, h*a21*k1) Tay(0, h*a31*k1 + h*a32*k2) Tay(0, h*a41*k1 + h*a42*k2 + h*a43*k3) Tay(0, h*b1*k1 + h*b2*k2 + h*b3*k3 + h*b4*k4) s1*k1 + s2*k2 + s3*k3 + s4*k4 + s5*k5. Now we extract the coefficients of T-RK as equations to be solved. d = (T-RK).ratexpand().collectterms(Fyy,Fy,F,h) eqs = [xx.subst(’h=1,F=1,Fy=1,Fyy=1’) for xx in d.args()] eqs2 = [sage_eval(repr(xx),locals=locals()) for xx in eqs] These equations are easily solved: solve(eqs2,[s1,s2,s3,s4,s5]). 100.

<span class='text_page_counter'>(101)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017.   1 1 3 3 3 3 3 1 s1 = − r1 + , s2 = r1 + , s3 = − r1 + , s4 = − r1 + , s5 = r1 4 8 4 8 4 8 4 8. and the extra parameter can be set to any value we like, for example r1 = 1. [xx.subs(r1=1) for xx in sols[0]]           1 9 3 5 s1 = − , s2 = , s3 = − , s4 = − , s5 = 1 8 8 8 8 This values can be written into a Butcher array as follows: 0 1 3 2 3. 1. 1 3 − 13. 1 1 −1. 1 8 − 18. 3 8 9 8. 1 3 8 − 38. 1 8 − 58. 1. for an embedded 4(3) method. If we choose the parameter r1 so that s4 = 0; that is r1 = 1/6, we obtain the following values:          1 1 1 1 s1 = , s2 = , s3 = , s4 = 0, s5 = 12 2 4 6. 6. Conclusions. The literature on Runge-Kutta methods and associated mathematics is vast, Butcher [1] lists many hundreds of references. However, much of this material is directed at the specialist researcher. The various articles which use computer algebra systems in an attempt to sidestep the specialist material have tended to use commercial systems, which puts the material out of bounds for people who don’t use (or can’t afford) those systems. As long ago as 1993, Joachim Neubüser, the creator of the GAP package for group theory (and which is part of Sage) [8] deplored the fact that mathematical theorems are open to everybody to use, but mathematics using a computer system was not, unless that system was open-source. Our article has attempted to allow the general non-specialist reader to experiment and explore some of the basic properties of Runge-Kutta methods, using only open-source systems. Since the computer algebra system handles all the algebraic hard work, the difficulty is mainly setting up the system at the beginning, and eliminating unnecessary higher derivatives when they are not needed. The level of calculus and algebra is not in fact particularly difficult—what is difficult is the complexity of the expressions, and the huge equations which derive from them. Using a CAS to do the “heavy lifting” means that much of this work falls within the purview of undergraduate material, and indeed could make a good undergraduate project, or an exploration for the interested non-specialist.. 101.

<span class='text_page_counter'>(102)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. References [1] John C. Butcher. Numerical Methods for Ordinary Differential Equations. John Wiley & Sons, 2008. [2] John C. Butcher. The Numerical Analysis of Ordinary Differential Equations: Runge-Kutta and General Linear Methods. Wiley-Interscience, 1987. [3] Burçin Eröcal and William A. Stein. “The Sage project: unifying free mathematical software to create a viable alternative to Magma, Maple, Mathematica and MATLAB”. In: Mathematical Software–ICMS 2010. Springer, 2010, pp. 12–27. [4] Walter Gander and Dominik Gruntz. “Derivation of numerical methods using computer algebra”. In: SIAM review 41.3 (1999), pp. 577–593. [5] Ernst Hairer, Syvert P. Nørsett, and Gerhard Wanner. Solving Ordinary Differential Equations I: Non-Stiff Systems. Springer-Verlag, Berlin, 1987. [6] John D. Lambert. Numerical Methods for Ordinary Differential Systems: the Initial Value Problem. John Wiley & Sons, Inc., 1991. [7] Maxima. Maxima, a Computer Algebra System. Version 5.30.0. rceforge. net/, 2013. [8] Joachim Neubüser. “An invitation to computational group theory”. In: Groups’ 93–Galway/St. Andrews, volume 212 of London Math. Soc. Lecture Note Ser. Citeseer. Aug. 1995, pp. 457– 475. [9] Antony Ralston and Philip Rabinowitz. A First Course in Numerical Analysis. Dover Publications, 1965. [10] William A. Stein et al. Sage Mathematics Software (Version 6.0). emath. org. The Sage Development Team. 2014. [11] Bernd Sturmfels. “What is a Gröbner basis?” In: Notices of the AMS 52.10 (Nov. 2005), pp. 2– 3.. 102.

<span class='text_page_counter'>(103)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Locus and Optimization Problems in Lower and Higher Dimensions Alasdair McAndrew. Wei-Chi Yang. College of Engineering and Science. Department of Mathematics and Statistics. Victoria University. Radford University. PO Box 18828, Melbourne 8001. Radford, VA 24142. Victoria, Australia. USA. Abstract In this paper we consider a locus problem that originated in a practice examination for admission to Chinese universities. We have made the problem more interesting and challenging by adding an optimization component. We also extend the locus and optimization problems to sphere and hyperspheres. The original problem looks simple and yet can prove challenging to many students. The solutions for locus in 2D are accessible to high school students. The solutions for maximizing the area or rectangular box using Lagrange multipliers is accessible to university students who have learned multi-variable calculus. Finally, optimization using Gröbner bases can be understood by those graduate students who have grasped the concept.. 1. Introduction. The following problem is typical of a Gaokao practice problem [1, 6]: one which is set on the University entrance examinations held across China. Although the problems may differ between provinces, and between rural and urban settings, they are designed to be challenging. We consider the following problem which is modified from the original practice problem [1]. Suppose a circle of radius 1 is centred at the origin, and a point C = (a, 0) with 0 < a < 1 is chosen. Let E be a point on the circle, and F another point so that the angle F CE is a right angle. Let G be chosen so that CEGF is a rectangle. The problem is to determine the locus of G as E moves around the circumference of the circle. We remark that the original problem stated in [1] is when the radius r = 6 and a = 4. To make the problem more challenging for university students, we follow up by asking the maximum value of the area of the rectangle CEGF . The problem is illustrated in Figure 1. In this paper, we use a Dynamic Geometry Software (DGS) for exploring the problems and gain some intuitions for possible solutions. Next we apply a Computer Algebra System (CAS) to verify that our conjectures are valid.. 103.

<span class='text_page_counter'>(104)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. G. F. E. C. Figure 1: The problem. 1.1. Explore with a DGS. We use a DGS such as GeoGebra [2] to conjecture what the locus will be and when the area yields a maximum. It is not hard to set up the initial circle and points, and then use the Locus command to obtain the locus. We might then make the guess that the locus was a circle. We can also determine the area of the rectangle, and indeed plot that area against the angle of CE with the positive x-axis.. 2. Finding the locus analytically. To find the locus of G analytically, we may start by letting the angle at the base of CE be θ. Let the lengths of CE and CF be u and v respectively. Then the coordinates of E and F are: F = (a − v sin θ, v cos θ).. E = (u cos θ + a, u sin θ),. This can be seen in Figure 2. Since E and F are both on a unit circle, it follows that (a + u cos θ)2 + (u sin θ)2 = 1,. (v sin θ − a)2 + (v cos θ)2 = 1. and these equations can be rewritten as a2 + 2u cos θ + u2 − 1 = 0,. a2 − 2v sin θ + v 2 − 1 = 0. By elementary symmetry, G = E + F − C = (u cos θ + v sin θ − a, u sin θ + v cos θ).. 104. (1).

<span class='text_page_counter'>(105)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. F. E θ v. v cos θ. u (0, 0). θ. C a. u sin θ. u cos θ. v sin θ Figure 2: Lengths and angles It is now not hard to show that the distance of G to the origin is independent of θ. To start: (u cos θ + v sin θ − a)2 + (u sin θ + v cos θ)2 = u2 + v 2 + a2 + 2au cos θ − 2av sin θ. (2). and the right hand side is easily obtained by expansion and repeated use of the identity sin2 θ + cos2 θ = 1. However, equations (1) can be rewritten as u2 + 2au cos θ = 1 − a2 ,. v 2 − 2av sin θ = 1 − a2 .. Substituting these into the right hand side of equation (2) produces 2 − a2 which is the square of the √ distance of G from the origin. Thus the locus of G is a circle centred at the origin and of radius 2 − a2 . A neater way involves vectors. Let OC be a, CE and CF be u and v respectively, and OE and OF be E and F respectively. These are shown in Figure 3.. v. E. F. u. (0, 0). a. Figure 3: Using vectors Since by construction u and v are perpendicular, their scalar product is zero: u · v = 0. We also have that E = a + u, kEk = 1, F = a + v, kFk = 1. (3). 105.

<span class='text_page_counter'>(106)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. The external point is obtained as G = a + u + v. Then kGk2 = G · G = (a + u + v) · (a + u + v) = a · a + u · u + v · v + 2a · u + 2a · v + 2u · v = kak2 + kuk2 + kvk2 + 2a · u + 2a · v.. (4). However, from equations (3) we have kEk2 = ka + uk2 = (a + u) · (a + u) = 1 or and similarly. a · a + 2a · u + u · u = kak2 + kuk2 + 2a · u = 1 ka + vk2 = a · a + 2a · v + v · v = kak2 + kvk2 + 2a · v = 1.. From equation (4) we have. kGk2 + kak2 = 2kak2 + kuk2 + kvk2 + 2a · u + 2a · v = ka + uk2 + ka + vk2 = 2. Thus kGk2 = 2 − kak2. which is equivalent to our previous result.. 3. Optimizing the area. Again we can use the DGS to help determine the positions and values of the maximum and minimum areas: the area A = (CE)(CF ) can be plotted against θ as shown in Figure 4. From this plot we might guess that the maximum area is obtained when θ = 3π/4 and the minimum when θ = −π/4. For both of these angles CE = CF and G lies on the x-axis. To find the area of the rectangle, equations (1) can be solved to obtain p √ u = −a cos θ ± 1 − a2 sin2 θ, v = a sin θ ± 1 − a2 cos2 θ.. Choosing the positive sign in each of these expressions for u and v in order to ensure that the values are positive, we have the area of the rectangle being p √   A = −a cos θ + 1 − a2 sin2 θ a sin θ + 1 − a2 cos2 θ .. 106.

<span class='text_page_counter'>(107)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. A 1.5 1 0.5 θ −π. − 3π 4. − π2. − π4. 0. π 4. π 2. 3π 4. π. Figure 4: The area of the rectangle We might guess that the largest rectangle will be obtained when θ = 3π/4 in which case u = v by symmetry and so the rectangle is a square. At θ = 3π/4 we can find that √  1√ 2 a + 2 − a2 2 √  1√ = 2 a + 2 − a2 2√ √  2 a2 + a 2 − a2 √ = 2 2 − a2 √ 2 √  2 a + a 2 − a2 √ =− 2 2 − a2. u= v du dθ dv dθ. Since u = v and u0 = −v 0 it follows that A0 = u0 v + uv 0 = 0 and hence θ = 3π/4 is a stationary point for A. √ Note that if we write R for 2 − a2 , being the radius of the circle which is the locus of G, then the above four values can be neatly written as 1 u = v = √ (a + R), 2 Since A = uv then at θ = 3π/4. a  a a u0 = −v 0 = √ 1 + = √ (a + R). R 2 R 2. √ √ 1 1 A = (a + R)2 = (a2 + 2a 2 − a2 + 2 − a2 ) = 1 + a 2 − a2 . 2 2 The above working is not conceptually difficult, but it is not trivial, and the scope for error in hand calculation is very great. So we might attempt to ameliorate such errors by employing a computer algebra system.. 107.

<span class='text_page_counter'>(108)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 4. Using a computer algebra system. Our choice is Sage [4], which is open-source, and has powerful geometric and algebraic capabilities. Indeed, Sage was originally called SAGE, this being the acronym of “Software for Algebraic and Geometric Experimentation”. All of the steps from the previous sections can be easily implemented, starting by defining the variables to be used and showing that the locus is a circle: sage: var(’u,v,x,y,a,theta’) sage: E = {x:a+u*cos(theta),y:u*sin(theta)} sage: F = {x:a-v*sin(theta),y:v*cos(theta)} Now the values of u and v can be computed: sage: usol = solve(E[x]^2+E[y]^2-1,u) sage: vsol = solve(F[x]^2+F[y]^2-1,v) The external point G can be defined, and the square of its distance to the origin computed: sage: G = {x:E[x]+F[x]-a,y:E[y]+F[y]} sage: R = (G[x]^2+G[y]^2).trig_simplify().expand() sage: R 2au cos(θ) − 2av sin(θ) + a2 + u2 + v 2. Finally the values from the u and v solutions above can be substituted: sage: R.subs({u:usol[0].rhs(),v:vsol[0].rhs()}).full_simplify() −a2 + 2. 4.1. Applying Gröbner bases and Lagrange multipliers. An alternate method to determine the locus of G is to use Gröbner bases. This requires using the ring of polynomials over the rational numbers, in which all the equations defining the points and areas can be written. Suppose the coordinates of E and F are (x1 , y1 ) and (x2 , y2 ). Their gradients to C = (a, 0) must have a product of −1 so that y1 y2 = −1 x1 − a x2 − a or simply that (x1 − a)(x2 − a) + y1 y2 = 0.. Since E and F are on the circle, and G has coordinates (g1 , g2 ) = (x1 + x2 − a, y1 + y2 ) we can find the locus of G as follows:. 108.

<span class='text_page_counter'>(109)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. sage: sage: sage: sage: sage: sage:. P.<x1,y1,x2,y2,g1,g2,a> = PolynomialRing(QQ) onCircle = [x1^2+y1^2-1,x2^2+y2^2-1] perpendicular = [(x1-a)*(x2-a)+y1*y2] g_point = [g1-x1-x2+a,g2-y1-y2] I = P.ideal(onCircle + perpendicular + g_point) I.elimination_ideal([x1,y1,x2,y2]) (g12 + g22 + a2 − 2)Q[x1 , y1 , x2 , y2 , g1 , g2 , a]. This last may be interpreted to be equal to zero, thus. g12 + g22 = 2 − a2 which shows that the locus is a circle. Note that here we did not have to make any assumptions about the shape or nature of the locus; we just computed a relationship between the coordinates of G and the fixed value a. To explain the previous approach a little: we have created a polynomial ideal; which may be considered as the closure under addition and polynomial multiplication from an initial set—in our case this set consisted of the polynomials which define the relationships between all the coordinates. A Gröbner basis may be considered as an alternative spanning set for the ideal consisting of polynomials with decreasing numbers of variables; in a sense a Gröbner basis is analogous to a triangularization of a linear system. In Sage, the elimination_ideal method creates a Gröbner basis and returns the polynomial from that basis which is independent of the given variables. An elegant and elementary introduction to Gröbner bases is given by Sturmfels [5]. We can also investigate the maximum size of the rectangle, using Lagrange multipliers. We have to maximize A = (CE)(CF ), or A2 = ((x1 − a)2 + y12 )((x2 − a)2 + y22 ). The constraints are: x21 + y12 = 1 x22 + y22 = 1 (x1 − a)(x2 − a) + y1 y2 = 0. Thus we need to solve the simultaneous first derivatives of L = ((x1 −a)2 +y12 )((x2 −a)2 +y22 )+λ1 (x21 +y12 −1)+λ2 (x22 +y22 −1)+λ3 ((x1 −a)(x2 −a)+y1 y2 ). Using Sage we can set up the expression and compute its derivatives sage: sage: sage: sage: sage:. var(’x1,y1,x2,y2,a,lambda1,lambda2,lambda3’) L = ((x1-a)^2+y1^2)*((x2-a)^2+y2^2) + lambda1*(x1^2+y1^2-1) L += lambda2*(x2^2+y2^2-1) + lambda3*((x1-a)*(x2-a)+y1*y2) diffs = [diff(L,x1), diff(L,x2), diff(L,y1), diff(L,y2)] diffs += [diff(L,lambda1),diff(L,lambda2), diff(L,lambda3)]. 109.

<span class='text_page_counter'>(110)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Now to solve the equations, we can try to obtain an expression giving the area in terms only of a, by using again Gröbner bases: sage: ....: sage: sage: ....: sage: sage: sage:. P.<x1,y1,x2,y2,a,lambda1,lambda2,lambda3,K>\ = PolynomialRing(QQ) I = P.ideal(diffs+[K^2-((x1-a)^2+y1^2)*((x2-a)^2+y2^2)]) E = I.elimination_ideal([x1,y1,x2,y2,lambda1,lambda2,\ lambda3]) Q0 = E.gen(0).factor()[1][0] var(’K’) solve(SR(Q0),K) √ √ [K = − −a2 + 2 a + 1, K = −a2 + 2 a + 1]. The second value is clearly positive; it can be written as √ K = 1 + a 2 − a2. which of course is our original result. For further information about Lagrange multipliers a good references is Lagrange’s own description, which has been translated into English [3].. 5. Alternative method. Another method of approaching the rectangle size, which will be easier to generalize to higher dimensions as we shall show later, is to consider the distances from each vertex √ of the rectangle CEGF to the point p = (0, 0). Clearly the distances of C, E, F, G to p are a, 1, 1, 2 − a2 respectively. This is shown on the left in Figure 5, and the rectangle itself, without the circles, is shown on the right. We introduce the lengths s and t as the projections of √ pC onto the √rectangle sides CE √ and CF 2 2 2 2 = 2 + t2 and respectively. Note that since s + t = a , we have 1 − s 1 − a 1 − t2 = √ 1 − a2 + s2 . Thus the area to be maximized is √ √ A = (s + 1 − a2 + s2 )(t + 1 − a2 + t2 ) subject to the condition s2 + t2 = a2 . In order to apply the method of Lagrange multipliers, consider the expression √ √ B = (s + 1 − a2 + s2 )(t + 1 − a2 + t2 ) + λ(s2 + t2 − a2 ) and its derivatives:   √ ∂B s = 1+ √ (t + 1 − a2 + t2 ) + 2λs ∂s 1 − a2 + s 2   √ ∂B t = (s + 1 − a2 + s2 ) 1 + √ + 2λt ∂t 1 − a2 + t 2 ∂B = s2 + t2 − a2 . ∂λ. 110. (5) (6) (7).

<span class='text_page_counter'>(111)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. F. G. √ 1 2 − a2. a. √. G. 1 − s2. E. C. 1 p. t. F. C Parameterizing the rectangle. √ 1 − t2. s. E. The rectangle itself. Figure 5: The rectangle parameterized for maximizing its area Setting the first two equations equal to zero, and simplifying, we obtain √ √ √ (s + 1 − a2 + s2 )(t + 1 − a2 + t2 ) + 2λs 1 − a2 + s2 = 0 √ √ √ (s + 1 − a2 + s2 )(t + 1 − a2 + t2 ) + 2λt 1 − a2 + t2 = 0. (8) (9). From these equations, it follows that √ √ s 1 − a2 + s2 = t 1 − a2 + t2 . Squaring both sides and rewriting this expression leads to (s2 − t2 )(1 − a2 + s2 + t2 ) = 0. Since a2 < 1 the second bracket is always positive, and so we have s2 = t2 or s = ±t. Since √ s2 + t2 = a2 we have the values s, t = ±a/ 2, leading to the areas: √ √ √ A(a/ 2, a/ 2) = 1 + a 2 − a2 √ √ A(a/ 2, −a/ 2) = 1 − a2 √ √ √ A(−a/ 2, −a/ 2) = 1 − a 2 − a2 These areas are given in decreasing value, as can be shown analytically, but it is easier to consider the plots of the three area functions in terms of a as shown in Figure √ 6. √ This shows that the largest area is obtained with s = t = a/ 2 and has value 1 + a 2 − a2 , as we found previously.. 111.

<span class='text_page_counter'>(112)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. √ 1 + a 2 − a2 1 − a2. √. 1 − a 2 − a2. Figure 6: Plots of area functions. 6. Extending the Problem to Higher Dimensions. The above computations regarding locus can easily be extended to a sphere. Suppose the sphere has radius one, and we choose a point C in its interior. Let E, F and G be three points on the surface so that CE, CF and CG are all pairwise perpendicular. Consider these three lines as the edges of a rectangular cuboid with common vertex C, and let H be its opposite vertex. This is illustrated in Figure 7. Then the locus of H is a sphere. In order to see this, we adopt an approach similar to that for the circle, and define the vectors a = OC, u = CE, v = CF, w = CG, E = OE, F = OF, G = OG, H = OH. Then a + u = E,. a + v = F,. a+w =G. and kEk2 = kFk2 = kFk2 = 1. G. H. E C F. Figure 7: The locus problem on a sphere. 112.

<span class='text_page_counter'>(113)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. and also Finally,. u · v = u · w = v · w = 0. H = a + u + v + w.. Using the same methods as for the circle, kHk2 + 2kak2 = ka + uk2 + ka + vk2 + ka + wk2 = kEk2 + kFk2 + kFk2 =3 and so kHk2 = 3 − 2kak2 .. Again this can be done in Sage. Let the three points on the surface have coordinates (xi , yi , zi ) for i = 1, 2, 3 and let C = (a, 0, 0). Perpendicularity can be characterized by the usual scalar product in R3 , so that for i 6= j: hxi − a, yi , zi i · hxj − a, yj , zj i = 0 or that. (xi − a)(xj − a) + yi yj + zi zj = 0.. We can describe H in terms of E, F, and G by. H =a+u+v+w = a + (E − a) + (F − a) + (G − a) = E + F + G − 2a. This means that the coordinates of H are given as H = (x1 + x2 + x3 − 2a, y1 + y2 + y3 , z1 + z2 + z3 ). Now we can set up all the equations, and simplify them by the computation of a Gröbner basis: sage: P.<x1,y1,z1,x2,y2,z2,x3,y3,z3,g1,g2,g3,a> = PolynomialRing(QQ) sage: onSphere = [x1^2+y1^2+z1^2-1,x2^2+y2^2+z2^2-1,x3^2+y3^2+z3^2-1] sage: perpendicular = [(x1-a)*(x2-a)+y1*y2+z1*z2, (x1-a)*(x3-a)+y1*y3+z1*z3,(x3-a)*(x2-a)+y3*y2+z3*z2,] sage: h_point = [g1-x1-x2-x3+2*a,g2-y1-y2-y3,g3-z1-z2-z3] sage: I = P.ideal(onSphere + perpendicular + h_point) sage: I.elimination_ideal([x1,y1,z1,x2,y2,z2,x3,y3,z3]) (g12 + g22 + g32 + 2a2 − 3)Q[x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , g1 , g2 , g3 , a]. This corresponds with the vector result obtained above: the locus is a sphere with radius r2 = 3 − 2a2 . Note that we made no assumptions about the geometry of the locus: the input consisted only of the polynomial relationships between the vertex coordinates; the output was a relationship which. 113.

<span class='text_page_counter'>(114)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. p. u a. 1. C s. t E0. E Figure 8: Setting up the three dimensional volume characterises a sphere. This is similar to our computations for the circle, where again we made no assumptions about the geometry of the locus. To maximize the volume of the cuboid, suppose that it is aligned with the xyz axes, and with C at the origin, and p at (s, t, u), as for the√rectangle in Figure 5. The vertex at C is shown in Figure 8. From the diagram, we have pE 0 = t2 + u2 and so √ √ E 0 E = 1 − t2 − u2 = 1 − a2 + s2 which means CE = s +. √. 1 − a2 + s 2 .. Thus the volume is given by √ √ √    V = s + 1 − a2 + s2 t + 1 − a2 + t2 u + 1 − a2 + u2. and this is to be maximized subject to s2 + t2 + u2 = a2 . By exactly the same argument with Lagrange 2 2 2 multipliers as above, we show a2 /3, √that optimal values of V will be obtained when s = t = u = √ and so each of s, t, u = ±a/ 3. The maximum value will be obtained when s = t = u = a/ 3 to obtain edge lengths CE, CF and CG all equal to p √ √  1 a/ 3 + 1 − a2 + a2 /3 = √ a + 3 − 2a2 3 and a volume of. . √  1 √ a + 3 − 2a2 3. 3. =. √. √  3 9a − 5a3 + (a2 + 3) 3 − 2a2 . 9. 114.

<span class='text_page_counter'>(115)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Now it is easy to consider n-dimensions. We suppose a is a vector with kak < 1, and there are n vectors ui all of which are pairwise orthogonal, and all of which satisfy ka + ui k = 1. We are to consider the locus of g = a + u1 + · · · + un . We have kgk2 = g · g = (a + u1 + · · · + un ) · (a + u1 + · · · + un ) = a · a + 2a · u1 + · · · + 2a · un + u1 · u1 + · · · + un · un and all the other products ui · uj = 0 by orthogonality. Adding (n − 1)a · a to both sides produces kgk2 + (n − 1)a · a = a · a + 2a · u1 + u1 · u1 + a · a + 2a · u2 + u2 · u2 + · · · + a · a + 2a · un + un · un = (a + u1 ) · (a + u1 ) + (a + u2 ) · (a + u2 ) + · · · + (a + un ) · (a + un ) = ka + u1 k2 + ka + u2 k2 + · · · + ka + un k2 =n from which we obtain kgk2 = n − (n − 1)kak2 .. Writing kak = a gives us the locus of the external point being an n-sphere with radius r2 = n − (n − 1)a2 . To maximize the hyper-volume, we note that it is given by the expression H=. n Y i=1. subject to. q  xi + 1 − a2 + x2i. x21 + x22 + · · · + x2n = a2 .. √ From the reasoning above, the maximum volume is obtained when all the xi values are equal to a/ n. Thus the maximum volume for n dimensions will be   p  n 1 √ a + n − (n − 1)a2 . n Expressions for n = 4, 5, 6 are:  √ 1 V4 = 2 − a4 − (a3 − 2a) 4 − 3a2 2√  √ 5 5 V5 = 41a − 150a3 + 125a + (25 + 10a2 − 19a4 ) 5 − 4a4 125  √ 1  6 V6 = 22a − 45a4 + 27 + (7a5 − 30a3 + 27a) 6 − 5a2 27. 115.

<span class='text_page_counter'>(116)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 7. Discussions and future work. A nice problem is to explore, using a DGS, what happens to the locus for the circle case if the angle F CE is changed to something other than 90 degrees. In fact, we can prove that if the angle F CE is 60 degrees, the locus will not be a circle. The explorations of other angles is a fruitful line of enquiry which the authors will discuss in a future paper. Another possibility for exploration is to replace the circle by an ellipse and consider the following questions: 1. Given an ellipse with a chosen internal point, and with a fixed angle F CE as in Figure 1, what is the locus of G? 2. What is the maximum value of the area of the parallelogram CEGF ? Note that because the ellipse is not as symmetric as the circle, we could also choose a different point C within the ellipse; one that is not on either of the major or minor axes for example. Extending our sphere scenario to an ellipsoid produces the scenario: we are given a fixed ellipsoid with the major axes, OA ≥ OB ≥ OC and an internal point C. For example we could choose C = (a, 0, 0) with a ≤ OC. Let E = (x1 , y1 , z1 ), F = (x2 , y2 , z2 ), G = (x3 , y3 , z3 ) be three points on the ellipsoid. We further suppose that each pair of vectors from CE, CF and CG have a fixed angle β between them. Considering the parallelepiped formed by CE, CF and CG, we may ask the following questions: 1. If H is a symmetric point of G for the parallelepiped, what is the locus of H? 2. Find the largest possible value of the volume of the parallelepiped. As for the two-dimensional problem above, we could choose other places for C. Initial exploration indicates that these problems are difficult to solve in complete generality, which leads to the further problem of considering what ellipsoid parameters, internal point positions, and common angles lead to curves or surfaces which can be easily described.. 8. Conclusion. Finding a curve defined by the locus of a moving point is popular and often asked in Gaokao in China. Typically students are allocated no more than 10 minutes to solve one problem. Under such circumstances, it is not hard to imagine that many students may lose interest and may even decide to give up to solving these types of problems. It is clear that technological tools can provide us with crucial intuition before we attempt more rigorous analytical solutions. Here we have gained geometric intuitions while using GeoGebra. In the meantime, we use the computer algebra system, Sage, for verifying that our analytical solutions are consistent with our initial intuitions. In this paper, we started out with a simple locus problem but we added an optimization component and investigated several scenarios including ones in 2D, 3D and beyond. The complexity level of the problems we posed vary from the simple to the difficult: some of our solutions are accessible to students from high school; others require more advanced mathematics such as university or even graduate levels. Evolving technological tools definitely have made mathematics fun and accessible on one hand, but. 116.

<span class='text_page_counter'>(117)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. they also allow the exploration of more challenging and theoretical mathematics. We hope that when mathematics is made more accessible to students, it is possible more students will be inspired to investigate problems ranging from the simple to the more challenging. We do not expect that exam-oriented curricula will change in the short term. However, encouraging a greater interest in mathematics for students, and in particular providing them with the technological tools to solve challenging and intricate problems beyond the reach of pencil-and-paper, is an important task for many educators and researchers.. References [1] Shi Gi Gin Bang. “Strategies for High School Mathematics Complete Review”. In: ed. by Cui Jun Guan Zhiming. Century Gold. Yanbian University Press, 2015, p. 647. [2] M. Hohenwarter et al. Geogebra, Dynamic Mathematics for Learning and Teaching, Version 5.0. IGI. 2015. URL: [3] Joseph Louis Lagrange. Analytical Mechanics. Vol. 191. trans. Auguste Boissonnade and Victor N. Vagliente. Springer Science & Business Media, 2013. [4] William A. Stein et al. Sage Mathematics Software (Version 6.7.0). The Sage Development Team. 2015. URL: . [5] Bernd Sturmfels. “What is a Gröbner basis?” In: Notices of the AMS 52.10 (Nov. 2005), pp. 2–3. [6] Wei-Chi Yang, Vladimir Shelomovskii, and Sylvester Thompson. “Extreme Lengths for Chords of an Ellipse”. In: The Electronic Journal of Mathematics and Technology (eJMT) 9.2 (2015), pp. 180–191. URL: 117.

<span class='text_page_counter'>(118)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Item Bank System for the Mathematics e-Learning System STACK Yasuyuki Nakamura Graduate School of Information Science Nagoya University Japan. Tetsuya Taniguchi College of Liberal Arts and Sciences Kitasato University Japan. Takahiro Nakahara Sangensha LLC, Japan. Abstract System for Teaching and Assessment using a Computer Algebra Kernel (STACK) is a computer-aided assessment system for mathematics, which functions as a plug-in for the learning management system Moodle. Using STACK, Moodle can provide questions for online mathematics tests. These questions typically require a mathematical expression as a response and the responses are assessed algebraically. STACK can be used to determine whether a student’s answer is correct, as well as providing appropriate feedback for various answers. Partial scores can even be provided for an incomplete answer. However, the questions must be designed carefully to take full advantage of STACK’s rich functionality. Well-designed questions can be valuable educational resources, especially in an e-learning environment. Thus, to promote the sharing of high-quality questions for use in online tests, we developed an Item Bank System for the mathematics e-learning system STACK. Using our system, users can submit authored questions in XML format to STACK along with additional metadata, including the subject, difficulty level, targeted grade and publicity level. After they have been uploaded and stored in the system, all users can utilize any of the questions that are open to the public. We expect that sharing these questions will further promote the effective use of mathematics e-learning systems.. 1. Introduction In recent years, information and communication technology (ICT) infrastructures have improved in schools. Many now offer computer suites to students so they can gain practical work experience and Wi-Fi networks are available to allow students to access the Internet using their own laptop computers. Portable digital devices, such as smartphones and tablet computers, are also gaining popularity and they are now ubiquitous in educational environments. The improved ICT infrastructure and the presence of these devices mean that e-learning has become increasingly popular. One of the most important functions of an e-learning system is the ability to administer online tests to evaluate a student’s comprehension of the course material. Typically, students read the test questions and enter their answers using an online form, where the answers are assessed automatically by an e-learning system. However, most existing online tests are only capable of assessing answers submitted in a true/false, multiple choice, numeric value, or simple descriptive format. Only a small minority of systems can assess the validity of algebraic mathematical expressions. Maple T.A. and System for Teaching and Assessment using a Computer Algebra. 118.

<span class='text_page_counter'>(119)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Kernel (STACK) [1, 2, 3, 4] are two examples of such systems. Maple T.A. is a commercial software product, which can be accessed from a wide range of learning management systems (LMS) such as Blackboard and Moodle. STACK is integrated with Moodle and is open source. We have been using Moodle as a LMS in our class and we employ STACK to administer online tests that involve mathematical expressions for science and maths subjects. As we show later, STACK has a rich set of functions that support science education. For example, it is capable of providing appropriate feedback in response to a variety of answers. However, there are several problems associated with utilizing STACK in a classroom setting. One of these is the complexity of authoring test questions, where it is more difficult to create higher quality questions. In order to overcome this issue, we developed a question authoring tool for STACK [5]. We consider that well designed questions are a valuable teaching resource and sharing them will reduce the cumulative effort required to author high quality questions. To facilitate this, we decided to develop an Item Bank System for use as a platform to share questions or other items. The remainder of this paper is organized as follows. In the next section, we provide a brief review of STACK and several examples of questions. In Section 3, we discuss several problems associated with STACK and explain how to resolve these problems. We then introduce the Item Bank System and describe how it operates in Section 4. In the final section, we provide our conclusions.. 2. Brief review of STACK STACK is a computer-aided assessment package for mathematics, which was developed by Sangwin at the University of Birmingham, UK. STACK v.2 is fully integrated with Moodle, a LMS. The integration was achieved in SOAP and it gives users the option of including questions in online tests that treat mathematical expressions as answers. The latest version of STACK is compatible with Moodle’s quiz module and it is much simpler to install than previous versions. When we evaluate a student’s understanding of a scientific subject using an online test, simple questions types such as multiple choice questions (MCQs), which are often included in online tests, are not sufficient because these questions formats cannot accurately represent a student’s comprehension level. For example, when answering MCQs, students can simply “choose” the correct answer from a list. Even if the student does not know the correct answer, there is a possibility of choosing the correct answer by guessing. Thus, it is possible to evaluate a student’s overall comprehension better when a large number of questions are presented to a student. However, it is unclear whether the student understood each question correctly within the context of the test. Therefore, questions that require students to input manual responses in the form of algebraic expressions are more accurate for evaluating comprehension, especially in scientific subjects. In order for this approach to be implemented, the mathematical expressions provided by students would have to be assessed algebraically. However, only a few systems are capable of this and STACK is one of them. The need for and applications of computer-aided assessments in scientific subjects have been discussed in detail previously [3]. Using STACK, students can provide answers to test questions in the form of mathematical expressions (e.g. polynomial expressions, matrix expressions, and functions). STACK evaluates the answers provided and generates responses that confirm or deny the accuracy of the answer, as well as giving valuable feedback. STACK uses Maxima, a computer algebra system, to assess the mathematical expressions provided by students. Figure 2.1 shows an example of a simple differential equation, i.e.,. dy + 2y = 0 , dx 119. (2.1).

<span class='text_page_counter'>(120)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. which was given to students as an online test in our class. The question is quite simple, but it includes two elements that need to be reviewed in order to evaluate the students’ understanding, i.e., it is necessary to check for the presence of any miscalculations and to determine whether an arbitrary constant was added. The correct answer to the question is Ce-2 x , which would be entered as C*exp(-2*x), but there are two typical incorrect answers, i.e., C*exp(2*x), which is an example of a miscalculation, and exp(-2*x), which does not include an arbitrary constant. Thus, we can frame statements that provide feedback. Examples of this are “Incorrect answer. Your answer should satisfy the ODE, but it does not.” if the answer was miscalculated, and: “Your answer is partially correct. The solution should contain a constant but your answer does not.” if the answer did not contain a constant (see Figure 2.2).. Figure 2.1 An example of a question that asks students to solve a simple differential equation.. Figure 2.2 Examples of feedback provided for incorrect (left) and partially correct (right) answers. In the first example shown in Figure 2.2 (left), the students can ascertain why their solutions are incorrect by reading the feedback provided by the system. They can learn that a solution to a differential equation should satisfy the differential equation. This is a very basic concept in differential equations, but some students do not recognize it immediately. A solution to a differential equation should contain arbitrary constants in response to the order of the differential equation as a general solution. However, students often forget to include constants. Therefore, the feedback shown in the second example of Figure 2.2 (right) can draw attention to this common mistake. Suitable feedback can be derived by comparing answers with a “potential response tree”, which can provide feedback to students based on their responses. An example of a potential response tree is illustrated in Figure 2.3. This functionality is one of the most distinctive features of STACK. In order for the system to operate, teachers must take the time to determine potential responses, which is a difficult, but necessary, task. If a question has higher complexity, it is more difficult to create the potential response tree.. 120.

<span class='text_page_counter'>(121)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Yes. No. Yes. No. Figure 2.3 Potential response tree for the question in Figure 2.1. Let us consider other examples. Figure 2.4 shows an example of a complex potential d2y dy response tree for a second order differential equation + 4 - 5y = 0 , where the solution is 2 dx dx x -5x y(x) = Ae + Be . Many potential answers might be provided by the students, which are all listed in the potential response tree. Thus, the tree should be well designed or well structured to give suitable feedback and reasonable scores, which helps the students to study by themselves using the maths e-learning system STACK. Well-designed questions can be valuable educational resources, especially in an e-learning environment. Figure 2.5 shows an example of a question in the subject area of mechanics. There are three answer fields for this question. In order to answer the subquestions, the students should understand the law of conservation of momentum and the law of conservation of energy. Therefore, the use of well-designed questions that require more than one concept, as well as the inclusion of a mechanism to give suitable feedback, allow student to learn each concept and the relationships among these concepts. When assignments are given to students, their work must be graded and returned to them as part of the education process. A computer-aided assessment system such as STACK has the potential to help teachers save time because of its feedback system and grading functionality. Questions that have been designed carefully to provide feedback, such as the one shown in Figure 2.2, can yield significant educational benefits. Therefore, sharing questions with educational value is important in an e-learning environment. We have provided a brief summary of STACK. It is important to note that STACK is currently used by many institutes all over the world [2], which indicates its usefulness.. 121.

<span class='text_page_counter'>(122)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Yes No. Figure 2.4 An example of the potential response tree for a second order differential equation.. Figure 2.5 An example of a question from the subject area of mechanics.. 3. Problems and solutions using STACK As described above, STACK can provide a rich set of functionalities to aid science education. However, the system is not without its problems. In this section, we review some of the main issues associated with STACK and describe how we solved them. The first problem is related to the installation of STACK on a computer. STACK comprises two main external tools: Maxima, a computer algebra system that is used to assess students’ answers algebraically; and gnuplot, a function-plotting tool that is used to draw graphs. Maxima requires Common Lisp and the problems that usually arise are related to the compatibility of these tools. We solved this problem by writing a document that describes the best combination of tools and by preparing binaries for the tools on our server [4]. The second problem with STACK is the language environment it uses. STACK’s language environment is set independently from the one used in Moodle. This situation is inconvenient because STACK is a subsystem of Moodle. We made minor changes to STACK’s source code when we localized it for Japanese [4]. Following our 122.

<span class='text_page_counter'>(123)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. modifications, STACK’s language environment is inherited from Moodle instead of being independent. We are preparing a Japanese language pack for the latest version of STACK. The third issue with STACK was its processing speed. From a user’s perspective, it can take a long time for the system to process answers, thereby affecting the attention of students. This problem was handled in the version 2.2 release of STACK, where the processing speed was improved significantly using caching. The fourth issue is that there is no perfect input method for mathematical expressions. This issue is yet to be solved, but it should be addressed in the future. The final major problem associated with STACK is the topic of this paper. As we mentioned above, STACK can provide appropriate feedback to specific types of answers, which is one of its most important functions. However, authoring questions is elaborate and time-consuming work, especially when we create questions with more complex potential response trees, as shown in Figure. 2.4. Nevertheless, the current interface for authoring questions is not convenient to use. In response, we developed a question-authoring tool using Microsoft Excel (Excel) and Visual Basic for Applications (VBA) [5]. In order for questions to be effective at promoting education, they must be formulated well. If well-structured questions are shared, thereby allowing any registered user access to them, this would solve the fifth problem in an effective manner, and this could help broaden the applications of e-learning to maths and science subjects. In order to make a platform for sharing questions, we developed an Item Bank System.. 4. Development of the Item Bank System There are three key phases in the development of an Item Bank System: the collection phase (collecting questions), use phase (questions are used) and build-up phase (the Item Bank System evolves). In this study, we outline the development of Mathbank.jp, which is our Item Bank System. 4.1 Collection Phase In order to share questions, it is necessary to collect them first. Thus, it is essential to create a simple, user-friendly interface to encourage users to register questions. We developed the Item Bank System shown in Figure 4.1 as a Moodle system. Any user can register questions using the “Regist” link and search for registered questions from the “Search” link after user authentication.. Figure 4.1 Front page of Mathbank.jp. 123.

<span class='text_page_counter'>(124)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. After selecting “Regist”, the registration screen shown in Figure 4.2 opens. When users register a question in the Item Bank, they should include metadata such as the grade, difficulty level, publicity level and key words. Questions can be registered by uploading an XML file via the interface. Alternatively, existing STACK questions on the Moodle server can be registered to the Item Bank System by adding metadata information. This makes it possible to register and classify existing questions in an effective manner. Metadata elements can be set from an administration screen. Both STACK question types and general Moodle quizzes as a gift format can utilize the Item Bank System. Users can search through the questions in the system by selecting the “Search” link and perform searches based on the metadata specified. A user can create questions on the Item Bank System itself by selecting the “Create” link and various tools, e.g., a question-authoring tool developed using Excel and VBA [5] is provided on the site after selecting the “Tool” link.. Figure 4.2 Screen for registering questions. 4.2 Use Phase The use phase provides time for the Item Bank System to be tried and tested. After searching through the list of questions, users can download STACK questions in an XML format. Users can then import the file to their servers for later use. The use phase also provides time for registered questions to be tested straight from the Item Bank System, which creates stored logs. The log is used to reconsider the difficulty level and to improve the quality of the questions in the system. 4.3 Build-up Phase The build-up phase aims to improve the Item Bank System further based on stored data, as well as adding value to collected questions that have not yet been implemented. For example, we can review the responses to specific questions to generate a list of incorrect responses to include in a MCQ. This type of question may be more suitable for mobile devices. Furthermore, this phase. 124.

<span class='text_page_counter'>(125)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. allows time to gather trial data, which could determine the true difficulty level of questions more accurately, because this is set objectively when each question is first registered. 4.4 Feedbacks from Users About six months have passed since we opened the Item Bank System to the public. Nineteen users and about 40 questions were available on the system as of April 13, 2014. Many users have said that it is convenient to share questions that are listed on the system because they can produce other questions based on the shared questions, which results in time savings. However, metadata such as the grade, difficulty level, publicity level and the key words used to classify the registered questions should be considered based on the feedbacks from users. For example, if we classify questions based on the grade metadata, the grade is not common to all schools because the progress schedule depends on each specific school. Some users have said that the questions should be classified based on the subject.. 5. Conclusion One of the most distinctive features of STACK is the ability to provide pertinent feedback to students taking online tests by analysing their responses using a potential response tree. Authoring questions that are suitable for the STACK framework may be difficult and time consuming, but they are also valuable educational resources. We consider that the cumulative effort required to create suitable questions might be reduced if quality questions were shared freely among educators. In order to facilitate this, we developed the Item Bank System, which is a platform for sharing questions. This means that anyone can register questions or download questions for their own use. The system was designed to be compatible with existing Moodle questions. In order for this system to work properly, we made several modifications to STACK, including enhancing its plotting features [6]. The Item Bank System is a major development for STACK because creating high-quality questions is one of the most important tasks during elearning using STACK. Furthermore, some users have considered sharing questions with other mathematics online testing systems as well as STACK, e.g., MATH ON WEB Learning College Mathematics by webMathematica [7], which should be promising future work. We expect that sharing questions will further enhance and broaden the scope of e-learning in the future. Acknowledgement This research was supported partially by KAKENHI Grant-in-Aid for Scientific Research (C) 25350353 from the Japan Society for the Promotion of Science (JSPS). References [1] Sangwin, C. J. (2004). Assessing mathematics automatically using computer algebra and the Internet. Teaching Mathematics and its Applications, 23(1), 1-14. [2] Sangwin, C. J. (2010). Who uses STACK? A report on the use of the STACK CAA system, Retrieved Sep. 9, 2013, from [3] Sangwin, C. (2013). Computer Aided Assessment of Mathematics. Oxford University Press. [4] Nakamura, Y. (2010). Mathematics e-Learning (in Japanese). Tokyo, Japan: Tokyo Denki University Press. [5] Nakamura, Y., Ohmata, Y. & Nakahara, T. (2012). Development of a question-authoring tool for math e-learning system STACK. IADIS International Conference e-Learning, 2012, Lisbon, Portugal, 435-440. [6] Nakamura, Y., Amano, H. & Nakahara T. (2011). Enhancement of plotting function of math elearning system STACK. World Conference on E-Learning in Corporate, Government, Healthcare, & Higher Education, Honolulu, U.S.A., 2621-2627. [7] MATH ON WEB Learning College Mathematics by webMathematica, 125.

<span class='text_page_counter'>(126)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. How teachers can use TI-Nspire CAS with laptops in an upper secondary course Per-Eskil Persson Malmö University, Sweden Abstract The focus of this study is how teachers can use laptops in their classes with TI-Nspire CAS technology and software, with or without concomitant use of handheld devices. Of particular interest has been examining possible changes in teachers' classroom practice and attitudes in using this technology for improving students' mathematical learning, problem-solving methods and deeper understanding of mathematics. Eight classes of students in theoretical programmes at upper secondary level in Sweden had continuous access to TI-Nspire CAS in mathematics during a whole semester. They used the software, and in some classes handhelds, during a whole course and also implemented the national test for the course on their laptops. The results show how TI-Nspire software on laptops can be used in regular education in courses at upper secondary level. Its various possibilities, of technical, mathematical and conceptual nature, have had the opportunity to appear in this relatively long study. But also the various obstacles and risks of this type of technology were identified, and the teachers' approaches to them were recorded. The teachers, having quite different prior experiences of technology, showed significant progress during the study, both in terms of management of technology in mathematical work, and when it came to integrating it into a high-quality learning environment. They also testified of the positive impact that the use of technology had on their students’ view of mathematics and of what mathematical activities would include.. 1. Introduction Calculators and computer software have been used for a rather long period in mathematics classrooms. A development of the calculators (handheld units) has taken place through the years, from basic calculators to graphing ones, and now advanced calculators working with computer algebra systems (CAS) and with dynamic graphs and geometry (DGS). During the same time, computers have changed from being large and rather rare in mathematics education into smaller, mobile units (laptops) that can more easily be used in instruction with continuity. The software has simultaneously changed from more particular mathematics programs to more general ones. One observation is that calculators and computer software show a converging development, even if there are differences in the practical use of them. They can be combined through a system of software and hand units that gives the user the opportunity to choose when and where he/she wants to use the one or the other. The TI-Nspire system, with or without CAS, can be used either as handheld units or as computer software, or as a combination of the two. Much of published research of technology used in mathematics instruction has been limited to handheld calculators, also when CAS has been used. Thus, it is of great value to also study how teachers and students are able to use laptops with TI-Nspire technology as software, with or without the simultaneous use of handheld units, and with the constructed curriculum material as an optional aid. Of special interest is furthermore to investigate possible changes in teaching practice, of students' problem-solving methods and of students’ mathematical learning and deeper understanding of mathematics, as well as other outcomes of this technological environment for teaching.. 126.

<span class='text_page_counter'>(127)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. 2. Theoretical framework The theoretical background for this evaluation rests on the classical didactic triangle with its three main elements student-teacher-mathematics, discussed for example by Steinbring [12]. This model has, however, been presented in various ways, depending on the overarching theory of learning and on the special context. The focus here lies on processes of mathematical interaction between individuals in the classroom [4], a mainly social constructivist view. Learning takes place through experiences that are mediated by tools, that can be mental (like spoken language), symbolic (like mathematical signs) or physical (like compasses), and with assistance drawn from other, competent individuals. Calculators and computer software hold a special position here, as they can be seen as tools within all three aspects (Figure 1).. The learner/student. Mediating tools The subject matter/ learning outcomes Figure 1: the didactic triangle with mediating tools as facilitators. The teacher/education. Balling [3] distinguishes between the use of software and calculators as calculating tools, teaching tools and learning tools. When they are used mainly for facilitating calculations (extensions of the calculators used before), they function as calculating tools. When the teacher takes advantage of their possibilities to illustrate and show important features of concepts and methods, they are used as teaching tools. Finally, when students use them for exploring mathematical objects, to discover concept features and to solve problems, they have the role of learning tools. A tool can develop into a useful instrument in a learning process called instrumental genesis [7], which has two closely interconnected components; instrumentalization, directed toward the artefact, and instrumentation, directed toward the subject, the student (See fig.2). These processes require time and effort from the user. He/she must develop skills for recognizing the tasks in which the instrument can be used and must then perform these tasks with the tool. For this, the user must develop instrumented action schemes that consist of a technical part and a mental part [7]. To learn instrumentation schemes does not in itself induce mathematical meaning and knowledge. Instead, the teacher must actively guide the students in a controlled evolution of knowledge, achieved by means of social construction in a class community [9]. Of special interest is the instrumental orchestration, which is defined as the intentional and systematic organisation and use of the artefacts available in a learning environment by the teacher, in order to guide students’ instrumental genesis [5]. In the present research project, TINspire CAS calculators together with the emulating computer software are the physical parts of the instrumentation process. The term resources is used to emphasize the variety of artefacts we can consider: a textbook, a piece of software, a student’s sheet, a discussion, etc. [6]. A resource is never isolated; it belongs to a set of resources. A process of genesis takes place, producing what is. 127.

<span class='text_page_counter'>(128)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. called a document. The teacher and the students build schemes of utilization of a set of resources for the same class of situations across a variety of contexts. This process is called a documentational genesis and also needs time and effort [6]. The participation and identity in the mathematical classroom builds on integrated communication and on representational infrastructures [8]. The way this is realised in teaching practice decides the effectiveness of information transfer and of cooperation, both student-student and teacher-student. The TI-Nspire environment has been studied for example by Artigue and Bardini [2]. They give a list of why this type of technology can be considered as novel and special, such as its nature, its file organizing and navigation system, its dynamic connection between graphical and geometrical environments and lists/spread sheets as well as its possibilities to create variables that can be used in any of the pages and applications within an activity. In their results, they noted that: …the introduction of this new tool was not without difficulty and required considerable initial work on the part of the teachers, both to allow rapid familiarisation on their part and those of the pupils but also to actualize the potentials offered by this new tool in mathematics activities (p. 1179). They also claim that: These characteristics affect teachers and students differently, and individuals belonging to the same category differently, according to their personal characteristics and experience. They can have both positive and negative influences on teaching and learning processes and need to be better understood (p. 1179). Aldon [1] has studied the use of TI-Nspire calculators, and assumes that the calculator is both a tool allowing calculation and representation of mathematical objects but also an element of students’ and teachers’ sets of resources [6]. As a digital resource, these handheld calculators possess the main functions required for documentary production. Also Weigand and Bichler [13] have studied the use of calculators, and they formulate some interesting questions for research. These concern how to counter the polarization that seems to occur between different students in the use of technology, the relationship between uncertainty among students in technical handling of the unit and lack of knowledge regarding the use of it in a way that is appropriate for the particular problem, and about the problem that some students are taking a very long time to establish such a familiarity with the tool that they can use it in an adequate way.. 3. Aims and research questions The intention was to make a study of the use of TI-Nspire CAS technology, as software for laptops (Figure 2) and as software combined with handheld calculators, in some upper secondary classes, where each student has continuous access to his/her own laptop and can use it for mathematics as well as for communication over the net (intranet and Internet). Six classes with laptops participated, of which one had concomitant access to hand units. Two classes with only handheld units acted as control group, and 133 students in total from the theoretical programmes (Natural Science and Social Science) participated together with their teachers.. 128.

<span class='text_page_counter'>(129)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Figure 2: the appearance of the TI-Nspire software, including the virtual keyboard of the calculator and split representations Of special interest for the study were possible changes in teachers’ instructional practice and the effect this has on students’ classroom work when they migrate from their current handheld (in most cases graphing calculators) to either version of TI-Nspire CAS or the combination of the two. This double shift, both from a graphing to a symbolic tool and from handheld to laptop, is not without complications [2]. There exists a need for further research of this shift. A special aim was to discern the advantages with using both handheld and laptops in the classroom work, and if important features and possibilities of the technology can be missing when only laptops are used. Teachers, as well as students, had the opportunity to show and also to express their opinions of the use of this material and this technology, especially compared to other learning tools like ordinary textbooks and graphing calculators or software, e.g. Geogebra. However, one of the main questions is the effects of this special learning environment, of which TI-Nspire here is a vital part, on students’ ability to solve problems and on their mathematical knowledge and conceptual understanding. The research questions were structured according to the three corners of the ‘didactical triangle’. In this paper, however, only the parts of the study that are mainly from a teaching perspective will be discussed: 1. Which benefits and special values, or obstacles, do teachers express of the two types of learning environment with TI-Nspire CAS, with laptops or with both laptops and handhelds, especially in comparison with other types of learning environments? In particular, does the use of handhelds together with laptops add extra values to the teaching opportunities?. 129.

<span class='text_page_counter'>(130)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 2. Which examples of how the instrumental and the documentational geneses have progressed during the project can be found? In particular, are there differences between the environments with and without handhelds units? 3. How has these digital tools supported new approaches to teaching for the teachers involved in the research project, leading to a change in their teaching practice? What common obstacles to new methods of teaching using these tools have they detected? 4. Which examples can be found of how the teachers have used the possibilities of the technology intentionally to promote student reflection on mathematical methods and concepts? The complete report of the entire study can be retrieved at Malmö University's database [10]. Some parts of the study have also been discussed in an article by the author[11]. These documents also address questions from the students' perspective.. 4. Methodology The classes and the teachers were all visited twice during the project. In comparing the data collected at the different occasions, it was possible to detect signs of progression in a variety of ways, such as teaching practice, the students’ use of the material and the technology, dialog and collaborative learning in the classroom, conceptual understanding etc. The second visit also included a special problem-solving experiment aimed at detecting the students’ skills and knowledge in using TI-Nspire CAS-technology for calculating, problem-solving and reflecting on answers and results that the technology presents for them.  .  . . The methods used involved the following main parts: Teacher interviews. A semi-structured interview with the teachers was made in connection with the first visit at the schools. All interviews were recorded and later transcribed. Student interviews. Two students were chosen from each class to be interviewed in semistructured form directly after the observed lesson by the first visit. And directly after the teaching experiment a focus group of 5-6 students were interviewed about their experience of the task and of TI-Nspire in general. Both of these types of interviews were also recorded and transcribed. Classroom observations. At the first visit at each school a lesson was observed by the researcher, using a special observation form. Teaching experiment. In the later part of the course, all students participated in a problemsolving experiment, conducted by the researcher, and designed to detect the students’ ability to use the TI-Nspire technology in a versatile way in longer, exploring task, and to record and communicate the result in a documental form (tns-file). A suitable problem-solving task was constructed within the area of linear functions and inequalities, which is an important part of the course curriculum. Teacher questionnaire. At the end of the school year all teachers were given questions concerning their overall experience of using the material and the different combinations of technology in their teaching practice, as well as their estimations of the effects on students’ deeper understanding of mathematical concepts and methods and the effects on students’ motivation, interest and self-confidence in connection with mathematics. The questionnaire was in its whole net-based.. 130.

<span class='text_page_counter'>(131)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. . . Student questionnaire. All participating students had the opportunity to express their experience of the learning environment with the types of technology they have used, their estimations of the quality of the mathematical learning with it, and of how it has affected their motivation, interest and self-confidence. Also this questionnaire was net-based. Collection of material. The intention was that interesting teaching material, tasks, tests, etc. that the participating teachers had produced during the project would be collected. Of special interest were the results of the national tests, providing an opportunity to detect possible differences between the classes using both handhelds and laptops and those who only had access to laptops. Some samples of the students’ produced tns-files and how they are organized in folders were also to be collected.. All data, of qualitative as well as of quantitative nature, was classified and structured according to the research questions, with the didactic triangle as the overarching structure. The method of analysis for the qualitative data is mainly descriptive [12]. Combined data from the interviews and the questionnaires give an interesting view of the advantages as well as the difficulties with using TI-Nspire technology.. 5. Some findings A considerable amount of data was collected during the study, and here only a selection of the results obtained will be shown. The focus in this article is the teachers' perspective, but in the tables below also students' opinions are given. The reason for this is to show whether or not teachers' and students' views coincide. Comparing advantages and risks The tables 1 – 6 below mainly addresses research question 1. They are the result of a compilation of the analysis of questionnaires and interviews. Table 1: common advantages with using TI-Nspire technology. Remarks about how frequent the answer is and some results from the questionnaires are given in the comments column [10] Advantages Teachers Students Comments A clear and distinct screen. X X Frequent in interviews Fast and flexible to work with. X Rather frequent Easier to present new concepts and demonstrate in X X 5 teachers whole class. Easy and useful for work with functions and X X Frequent, graphs. 70 % in st.q. all teachers New possibilities in the geometry and chance X areas of mathematics. You can write all of the solutions to tasks in the X program/on the handheld. You can easily check answers, also those you X X solve by hand.. 131.

<span class='text_page_counter'>(132)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. You can manage more difficult tasks,on a higher level. New tools, like the solve-command, give you more power. You can learn more and understand mathematics better. You can use several ways to solve a problem. You can focus on understanding instead of making many calculations. Easy to use after a while. Useful in other subject, e.g. physics and chemistry. Easier to communicate. Mathematics is more interesting with TI-Nspire More fun to work with mathematics You cooperate more in problem-solving The use of TI-Nspire has changes my conceptions of how you work with mathematics.. X. X. X. X. Rather freq., 42 % in st.q. 6 teachers Rather frequent 3 teachers. X X. X. 6 teachers. X. X X. X. X X. X X X X. 3 teachers 24 % in st.q. 34 % in st.q. 6 teachers 21 % in st.q. 26 % in st.q.. Table 2: common difficulties with using TI.Nspire technology. Remarks about how frequent the answer is and some results from the questionnaires are given in the comments column [10] Difficulties and risks Teachers Students Comments Hard to start with TI-Nspire. X X 6 teachers Students think it is hard to use in ‘normal’ X 6 teachers schoolwork. Takes time to learn how to use TI-Nspire, e.g. X X Rather freq., find your way in menus. 47 % in st.q. 3 teachers Difficult to use different tools, e.g. for functions X Rather freq., and graphs. 39 % in st.q. Sometimes difficult to know how to start solving X Rather freq., a problem. 42 % in st.q. Sometimes you do not know what you are doing, X especially using CAS. Sometimes hard to interpret the answers you get X 26 % in st.q. with CAS, e.g. with the solve-command. CAS difficult to handle. The step up from X graphing calculators is high. It is essential that you also practice solving tasks X Frequent in with paper and pencil. You must do both. the interviews When you work with paper and pencil, you X understand better.. 132.

<span class='text_page_counter'>(133)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. A risk for the less able students that they cannot manage this technology, especially CAS. A risk for the less able students that they learn less than without technology. Technology often brings problems of technical nature, e.g. empty batteries, starting up etc.. X X X. X. Rather freq. in interviews Frequent in interviews. Table 3: advantages with TI-Nspire compared to paper-and-pencil work. Remarks about how frequent the answer is and some results from the questionnaires are given in the comments column [10] Advantages with TI.Nspire compared to paper- Teachers Students Comments and-pencil work You work faster, so you reach further in X X Frequent by mathematics and you get better knowledge. students Nicer and more accurate graphs X X Freq. by both t. and st. You can make more difficult algebraic X calculations. You can easily try many alternatives, e.g. for a X function. You have usually many alternatives to how to X X solve a problem. You work more in groups than with p-o-p. X You can focus more on understanding e.g. a graph X X and less on plotting and drawing it. Better understanding of mathematics with TIX Nspire. Easier to check answers, which is rarely done X X Frequent by with p-o-p. students Table 4: advantages with laptops compared to handheld units. Remarks about how frequent the answer is and some results from the questionnaires are given in the comments column [10] Advantages with laptops compared to Teachers Students Comments handheld units. Larger screen with colour. You see more of what X X Frequent in you are doing. User friendly. interviews. Easier to work with a whole keyboard X X You can use the usual key commands for X computers. Easier to edit expressions and text X Easier to find your way in menus X X Better for handling tns-files X X. 133.

<span class='text_page_counter'>(134)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Table 5: advantages with handheld units compared to laptops. Remarks about how frequent the answer is and some results from the questionnaires are given in the comments column [10] Advantages with handheld units compared to Teachers Students Comments laptops. Faster with handheld when you are doing simpler X Rather freq. calculations. by students Therefore more flexible in other subjects, e.g. X X physics. Easier with handhelds in test situations. X X Easier to carry than a laptop. X Therefore less risk forgetting to bring. X It takes more time to start the computers. X More technical problems with computers. X You are not dependent on a network. X X Table 6: advantages with having handheld units combined with laptops. Remarks about how frequent the answer is and some results from the questionnaires are given in the comments column [10] Advantages with having handheld units Teachers Students Comments combined with laptops. You can choose yourself which is best in each X situation if you are used to both. Handheld units are better to use at tests, but X computers in the everyday work. Handheld units are better for quick calculations, X X Rather freq. computers for working with graph or solving by students larger problems Easier with transfer of files when you do it X yourself. You are not so dependent on a network. X X Many of these are well-known opinions of teachers and students that have been presented in other research of the use of technology in general. But the difference is that this research project deals with the use of laptops in regular teaching over a longer period. Here are some teachers' voices (T1 etc. are abbreviations for teachers): T1:. I am very positive to using that type of tool. I think you get a much better understanding, an eye-opener, and not as much tinkering by hand with miscalculations. You get a much better picture, and it binds better ties between math and physics as well. T2: I welcome it, because I think it can increase understanding. You can check calculations, make your own calculations and test different ways of calculating. One can see how mathematics can be related. Then I think it might be a little more fun and interesting, hopefully. That you do not always work exactly the same as with the book, but you can. 134.

<span class='text_page_counter'>(135)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. work in different ways. I hope the students may think it is fun to explore and learn, get some wow-experiences. Critical opinions were also expressed by some: T1: It's a pretty steep learning curve, I think. It's been 1-2 months now and only now they have really started to get acquainted with everything. In the beginning, it was quite chaotic. T2: I fear that the students who has trouble keeping up with the others too easily use the calculator to see that it got right what he did, without really thinking through the task itself. I fear that they will enter ‘solve’ to see what happens. Then you do not get this struggling like you get when sitting with pencil and paper. Advantages with laptops, hand units or the combination of the two: T1: One advantage with technology is that it is faster. You can more quickly get to what is important in mathematics. If I have to draw something on the board, without technology, it takes a very long time, and then of course the students are asleep when I do it. Then it's really good with this, one can immediately draw and then you have mathematics. Student: It is much more comfortable to sit with a calculator in a test instead of a computer in front of you. And the handheld is very pleasant to work with when you want to get something fast. It is also easier to move around and carry a calculator than a computer. T2: User-friendliness is very much better on the computer software than on the calculator, so it is easier to use. And it's bigger and better with colour screen. And a little bit easier also with file handling. Users can post files that students can download. It's easier than if you were to send out files with "connect-to-class", with this as an extra task on the calculators. T3: It gets much clearer on the computer with graphs. It has more space to explore in them. For students, despite having the computers, handhelds are many times better. So it's both. They use both continuously. To make a summary of the opinions of the equipment that the teachers and students had used: Most of them where satisfied with what they had, and did not want to change. But the combination of laptop and handheld unit protrudes somewhat, in that almost all the students who had that equipment believed and gave reasons for this being the best, and this was confirmed by their teachers. They expressed that they wanted to have a choice in a given situation. Using laptops at the national test All six classes with laptops could, by special permission by the Swedish National Agency for Education, use them in the national test. There were two main conditions for this: First, any communication between students or through Internet was forbidden, and second, unwanted files that could be used for cheating should not be accessible. Only the software TI-Nspire was allowed for the students to use. Five of the teachers solved the problems with the two conditions by positioning themselves behind the students, so that they could watch all screens the whole time.. 135.

<span class='text_page_counter'>(136)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. T1:. Students sat in a large classroom all facing forward. I stood in the back of the classroom so that I could see all the computers. For questions they had to come to me, not I to them, because to the students should not know which way I looked. We cannot turn off the wireless network. This interferes with other activities too much.. One of the teachers instead applied the method of the closed down network: T2: We used the computers in both tests. The school had shut down Internet access just for the computers that the students used when they made the tests. We had no action against bluetooth, but students did not use this, I am quite sure. We had to place students with computer to computer and back to back with a larger wooden screen between the computers when they were sitting next to each other. Students appreciated having them in the test, since CAS is much clearer on the computer than on the hand units. The teachers answered that there were no or very minor problems in the test situations, so the overall result of this point in the study is that it is possible to manage national tests with laptops, and also that there are various ways to fulfil the conditions. These results from the study were in fact part of the basis for a later decision of the Swedish National Agency to permit laptops at national tests. They are now allowed under the conditions mentioned above. Instrumental and documentational genesis In the beginning of the project, most of the teachers were rather unfamiliar with the TI-Nspire software and the handheld units. They were, as mentioned above, also rather new in using CAS in mathematics teaching. In the teacher interview they were asked about in what ways they used the laptops or the handhelds. The alternatives were: for demonstration during reviews, for general discussion in class, for helping students or groups of students. The answers in the teacher interviews varied quite a lot, mainly depending on what skills the individual teacher had, or believed he/she had. Here are some examples: T: My reviews, of course, and then students can work simultaneously. And it is clear that when you move around in the class and help, you obviously take advantage of the software and show them and try to make them understand how to use it. Group discussions can of course also be very good sometimes, when they are sitting working and are forced to try to explain to each other. The teachers were also asked in the interviews about how they intended the students to work with the technology. The alternatives here were: as a calculating aid, as a problem-solving tool, to discover and understand mathematical concepts and methods etc. [3]. Again, the answers in the interview varied: T: Since I am a beginner, then it is the first option, of course. The second one, I am going with, but the third one... I have not got that far myself. But it's something I can imagine doing. But most of the teachers also told that they wanted the students to help each other, and that it was very positive if they did so. The reasons for this are that it is good for the students to think and try for themselves before they get a sometimes too quick help, and that is important that students talk and discuss mathematics with each other. And some of the students often have acquired good skills in handling the technology.. 136.

<span class='text_page_counter'>(137)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. T1:. Usually it is the students who have the knowledge of the more practical management. There is always someone in the class who knows, and then knowledge is transmitted through students more often than through me. If anything pops up during the lesson they most often help each other out. T2: It feels better when they are trying themselves for a while before they ask me, of course. If they ask me directly and I help them, not much has been solved for them actually. They have just been served a solution without having worked the problem. So I prefer that they do not call me directly. And I always encourage cooperation. To discuss the problems together and help each other I see as a great resource in the classroom. The problem-solving experiment With the problem-solving experiment near the end of the project, students’ general skills in using the software or the handheld units were put to a test. The problems that the students were presented to were constructed with three levels: First involving ordinary calculations and/or readings of graphs, then some more complicated calculations with comparing different answers and making decisions, and last an exploring task where the students had to write answers in plain text. The intention was to give them the opportunity to show progress in the use of this technology in all three aspects of tools according to Balling’s [3] classification. One of the problems was called “Intersection points” and was based on two functions, one quadratic and one linear that intersected each other ( f1 (x)  x 2  1 and f 2 (x)  2x  4 ). First the students were asked to read and note the points of intersection, also in the case when the linear function was moved (by changing the constant) so that no intersection appeared. Then they had to find out with which constant term in the linear function (instead of 4) you get two, one or no intersections. After that they were asked to solve a non-linear system of equations that in reality exactly reflected the graphs in the first part (the students were supposed to discover this). Then a parameter m was introduced in the linear function for the constant term, and they were asked to solve the system again and explained why this general solution created two, one or no solutions for the system: x   m  1 x  m  1  x 2  y  1 , with the solutions  or     y  m  2 m  2  y  m  2 m  2 2 x  y   m The students then were asked to reflect on the two general solutions and explain why these created the different types of solutions for varying values of m. The observation of the classes and the analysis of their saved files showed that they handled TI-Nspire in a mainly productive way. Their problem-solving skills with TI-Nspire were good, with only a few exceptions. Many also managed to provide comprehensive answers to the more difficult parts of the problems (See figure 3 for one example). The experiences of the teachers were also in general that the students' development had progressed well throughout the project: T1:. They already invent their own methods to check things out. They have found the truefalse function to check if expressions are equal. I have not taught them this. We see that they are a bit faster at detecting patterns, too. T2: The more they learn about the technology the freer they become. And there's always a bunch which are doing the other way, with trial and error, and it does not work so well in the long run. But you must work really hard on it so that they get it as their tool.. 137.

<span class='text_page_counter'>(138)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Figure 3: example of one student’s answers to the last questions in the problem (in Swedish). To question 5 he writes: The functions do not intersect. The answer was “false”. To question 6 he gives the general solution the CAS provides and writes: m cannot be negative, because it is impossible to take the square root of a negative number. In question 7 he concludes: No solution when m < 0. One solution when m = 0. Two solutions when m > 0. 6. Summary and discussion This research project, with the different methods used, has created a lot of data. Some parts of the data point in somewhat different directions, but this is to be expected when you make research involving people. Humans are individuals, with different beliefs, interests and goals. These can create obstacles when new technology is introduced, especially in a special subject like mathematics, where beliefs about what counts as proper activities and methods go deep. And that is true for both teachers and students, as well as parents, headmasters and others in society, whose opinions do not show in this study. Some interesting and important conclusions have been possible to draw, particularly of the benefits and difficulties of using laptops, with or without handheld units. These conclusions involve sometimes rather superficial things like appearance and similarity with computers, but also for mathematics education crucial things like the importance of problem solving and exploration and development of deeper understanding of mathematical concepts and methods. The results also shows that teachers in general are positive about the use of technology that TINspire CAS, with its many opportunities and its mathematical robustness. A summary of some of the results [10]:. 138.

<span class='text_page_counter'>(139)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. . The teachers expressed a number of advantages with the TI-Nspire technology in general. Among these were more physical benefits, as a good screen and that it is fast and flexible to work with. But more important were the mathematical ones, such as easier to work with functions and other areas of mathematics, new ways of working with problem-solving, dealing with difficult tasks and etc., and the conceptual ones, like learning more mathematics, understanding it better and focussing more on understanding in the activities.. . Among the risks and difficulties with the TI-Nspire that teachers mentioned were that it is difficult to begin with and that it takes some time for the students to learn to use. But after the initial "break-in period" the technology seemed to be pretty easy to use for them. Special difficulties were expressed in connection with the CAS, like it is difficult to handle and to understand the answers, and that sometimes the students do not really know what they do.. . Some benefits of the TI-Nspire compared to paper and pencil were also mentioned. The students work faster, so that they reach further into mathematics and get a better understanding. It is easier to work with graphs, to carry out difficult algebraic calculations and to try many options. To check the response data from the screen was also more frequent among students, and understanding of mathematics was promoted when they did not have to focus on simple calculations or plotting graphs.. . Benefits of laptops compared to hand units that were mentioned: larger screen with color so you can see more of what you do, easier to work with full keyboard, more user-friendly, easier to edit and navigate in menus, easier to handle files and more. Benefits of hand units compared to laptops were that they are easier to use in basic calculations and therefore more flexible in other disciplines such as physics, easier to handle in test situations, easier to carry than a laptop and therefore less likely to be forgotten and that they are not dependent on a network. It also takes more time to start the computers and that there are more technical problems in connection with these. Benefits of having hand units combined with laptops are that you can choose by yourself which of them that is best in each situation if you are used to both. Hand units are better for quick calculations, computers for working with graphs or to solve larger problems. It is also easier to transfer files when you have access to the entire system, and it is not so dependent on a network that might not work so well. Most of the teachers believed that a combination of handheld units and laptops is the ideal situation in the total classroom work.. . There was a high correlation between the benefits and special values of the three types of TINspire environments that the teachers and the students mentioned. This is important for the decisions to start using this technology in mathematics at schools and in classrooms.. . At the national tests laptops were used without any larger problems. The method used by most of the teachers was to position them during the test so that it was possible for them to watch all the students’ laptop screens. This particular experiment was successful, but also showed that more technical solutions are not chosen at first hand.. . Most of the teachers stated that their ways of teaching had changed to some extent. The general changes they stated were that they used computer and projector more, that they worked more with problem-solving and that they used group work more in their teaching. The ways they intended the students to work with the technology, as a calculating aid, as a. 139.

<span class='text_page_counter'>(140)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. problem-solving tool, to discover and understand mathematical concepts and methods etc., varied to some extent but their explicit goal was all of these alternatives. . Among common obstacles to high-quality teaching were that students could have difficulties in handling the technology and/or the mathematics they encounter there. Most of the teachers told that they wanted the students to help each other, because it is good for the students to think and try for themselves before they get a sometimes too quick help, and that it is important that students talk and discuss mathematics with each other.. . Few examples could be seen in the project of how the teachers had used the technology intentionally to promote student reflection on mathematical methods and concepts. For instance, most of the teachers did not construct their own tns-files for such a purpose. However, some explained that the cooperation between students is of great importance also for reflection, and reflection is important for the understanding of mathematics.. . The ways in which students documented their work with tasks and problems showed very little progress during the project. Most of them used paper and pencil to document, which also was what the majority of the teachers wanted them to do. But two of the classes, using laptops, were exceptions, in that they were used to the teacher giving them tasks as tns-files which they were to return with their solutions written in. A clear example of differences between environments with and without handheld units in documenting is that it is more difficult to work with text using the handhelds. The display is rather small and so is the keyboard. This makes it difficult to acquire any higher speed in the work with more complicated problems.. . All of the teachers answered that the students more easily use TI-Nspire to illustrate mathematical objects and to examine them thoroughly. Six teachers said that it gives more opportunities within problem-solving and that the students can manage more difficult tasks. But only three teachers definitely claim that the students seem to build a deeper understanding for mathematics with TI-Nspire. A reason for this that the teachers indicated is that deeper understanding always involves the use of paper and pencil. They believe that you can calculate and explore with the technology, but you need to transfer the results outside of it to really understand.. In this study, the three different technical combinations have appeared as the platform for TI-Nspire technology. Students and teachers have used this in regular education for a whole semester and have during this fairly long period of time been able to utilize almost all aspects of it that Artigue and Bardini [2] mention. The results from this study largely confirm their observations of the difficulties and the great efforts that meet students and teachers when they start using this technology. They also mention the substantial individual differences in how the instrumental genesis progresses. Some individuals benefit quickly from the technology, others will take a very long time. This is also described by Weigand and Bichler [13], and the results of this study show good compliance with their observations. Unfortunately, it was not possible in this study to give answers to all their questions, even if some light has been shed on some of them. For example, the findings suggest that there is a correlation between the uncertainty of dealing with the technical part of the unit and lack of knowledge about how to use it for the present problem. However, it seems that such deficiencies quickly can be removed for many students, if opportunities for collaboration in the classroom are given, and if the teacher encourages students to support each other in using the technology.. 140.

<span class='text_page_counter'>(141)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Teachers and students in the study showed significant progress in the instrumental genesis and also to some extent in the documental one. But here a much more complicated process is required, and the results suggest that this may take a long time, maybe several years. It is difficult to implement technology as an organic part of the resources of a "document" [6] which represent whole work sessions or lessons in mathematics. However, even here a certain development was observed, and there were signs of a continuation of the process involving the TI-Nspire for both teachers and students, now at a higher level. The teachers were finally in the questionnaire asked if they thought that participation in this research project had been developing for them in their teaching. Five of them answered that it was to some parts, and three that it was in many ways. Some of their comments were: T1: New teaching ways have been opened and I am interested to continue working with the software. T2:. It has developed me a lot, especially within data and statistics.. T3:. Has been fun to see what is possible to do with the new technology. When my own knowledge and practice is better, I will benefit greatly from having seen all the possibilities.. 6. Further research In the research project, which was of a broad and in some respects superficial character, appeared some important questions that continued research could provide answers to. One such is based on a deeper analysis of the tns-files that the students produced in the problem-solving experiment. How did they argue in and for their solutions, how did they present them in text form, how could they take advantage of the dynamic links between different applications at the presentation? Furthermore, it would be interesting to specifically monitor and analyse the documentational genesis, both of students and of teachers, over a longer period of time. The time span of the current study proved not to be enough. Finally, it would be of great interest to study how teachers can take advantage of the special capabilities of the platforms like TI-Nspire to assess students some of the abilities specified in the new Swedish curriculum, like ability to communicate and ability to present an argumentation and to give proofs.. 141.

<span class='text_page_counter'>(142)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 7. References [1]. Aldon, G., Calculators as digital resources. Paper at CERME 7, February 9-13, 2011, Rzeszów, Poland, 2011. [2]. Artigue, M & Bardini, C., New didactical phenomena prompted by TI.Nspire specifities – The mathematical component of the instrumentation process. In V. Durand-Guerrier, S. Soury-Lavergne & F. Arzarello (Eds.). Proceedings of CERME 6, January 28 – February 1, 2009, Lyon, France, 2009 (pp. 1171-1180). [3] Balling, D. Grafregneren i gymnasiets matematikundervisning – Lærernes holdninger og erfaringer [in Danish]. Doctoral thesis. Aarhus: University of Southern Denmark, 2003. [4]. Cobb, P. & Bauersfeld, H. (Eds.) The emergence of mathematical meaning – Interaction in classroom cultures, Vol. 2. Hillsdale, N.J.: Lawrence Erlbaum, 1998. [5]. Drijvers, P., Doorman, M., Boon, P., Reed, H., & Gravemeijer, K. The teacher and the tool: instrumental orchestrations in the technology-rich mathematics classroom. Educational Studies in Mathematics, 2010, 75(2), 213-234.. [6]. Gueudet, G. & Trouche, L. Towards new documentation systems for mathematics teachers? Educational Studies in Mathematics, 2009, 71, 199-218.. [7]. Guin, D. & Trouche, L. The complex process of converting tools into mathematical instruments: The case of calculators. International Journal of Computers for Mathematical Learning, 1999, 3(3), 195–227.. [8]. Hegedus, S. & Penuel, W. Studying new forms of participation and identity in mathematics classrooms with integrated communication and representational infrastructures. Educational Studies in Mathematics, 2008, 68, 171–183.. [9]. Mariotti, M. A. The influence of technological advances on students' mathematics learning. I L. English (Ed.), Handbook of international research in mathematics learning (pp. 695- 723). Mahwah, NJ: Lawrence Erlbaum Associates Publishers, 2002. [10]. Persson, P-E. Teaching and learning mathematics at secondary level with TI-Nspire technology. Research report, 2011. Available at :8080/handle/2043/12582. [11]. Persson, P-E. Elevers möte med ett avancerat CAS-verktyg använt på laptops i en gymnasiekurs [in Swedish]. Paper at MADIF 8, January 24-25, 2012, Umeå, Sweden.. [12]. Steinbring, H. Analyzing mathematical teaching-learning situations – The interplay of communicational and epistemological constraints. Educational Studies in Mathematics, 2005, 59, 313-324.. [13]. Weigand, H-G. & Bichler, E. The long term project “Integration of symbolic calculator in mathematics lessons” – The case of calculus. In V. Durand-Guerrier, S. Soury-Lavergne & F. Arzarello (Eds.). Proceedings of CERME 6, January 28 – February 1, 2009, Lyon, France (pp. 1191-1200).. 142.

<span class='text_page_counter'>(143)</span> APPLIED MATHEMATICS, TECHNOLOGY AND EDUCATION JOURNAL. A M T E J. TẠP CHÍ TOÁN ỨNG DỤNG, CÔNG NGHỆ VÀ GIÁO DỤC. Applied Mathematics, Technology and Education Journal – No 02, 07/2017. The Area of the Solid of Intersection of a Sphere and an Ellipsoid, a Parametric Approach Vladimir V. Shelomovskii Russia. Wei–Chi Yang. Skip Thompson. Department of Mathematics and Statistics. Department of Mathematics and Statistics. Radford University. Radford University Radford,. Radford, Virginia 24060, USA. Virginia 24060, USA. Abstract In a previous paper we considered the intersection of a sphere and an ellipsoid using rectangular coordinates. In this paper we use a different approach based on using parametric coordinates and the use of a graphics program GInMA in order to gain further insight into this problem. As in our previous paper, we determine the surface area of the respective portions of the ellipsoid and the sphere that are inside each other. We provide examples to illustrate the various possibilities that arise and we provide Maple worksheets that can be used to deal with the calculations that must be performed. The task of the present paper is the derivation of the equations that allow us to represent graphically the solid of intersection and to calculate its surface area accurately and efficiently. We choose a system of coordinates with the origin at the center of the sphere and its axis directed toward the center of a spherical piece of the solid of intersection. We examine a variable step-size integration method. For an accuracy of approximately 10–6, 100 to 600 calculation points are typically sufficient and a typical calculation time is less than a minute.. 1. Problem Statement. We consider the equation of an ellipsoid centered at the point O(0,0,0) in matrix form. (. ) (). −2 x a 0 0 T ⃗ ⃗= y . ⃗ X A X −1=0 , where A= 0 b−2 0 , X z 0 0 c−2. (1). x2 y 2 z2 + + −1=0. We use a a2 b2 c2 sphere of radius r centered at a point X⃗T0 =( x 0 , y 0 , z 0)=(k , l , m). We assume the center of the sphere is inside the first quadrant, where x 0≥0, y 0≥0 , z 0≥0 and that it is outside the ellipsoid. The z axis is chosen so that the ellipsoid vertex (0 , 0 , c) is the vertex closest to point X⃗ 0 . We construct the solid of intersection of the sphere and the ellipsoid, render it, and find the surface area of the solid of intersection. When it proves convenient, we use the ellipsoid in its scalar form. 2. Possible Values of the Sphere Radius. Let d be the distance from X⃗ 0 to the ellipsoid and let D be the greatest distance between X⃗ 0 and points on the ellipsoid. A nontrivial solution is possible for our problem only if d < r < D . To find d and D , we use Lagrange’s method for finding extrema. Finding ⃗ − X⃗ 0 )2 under the condition X⃗T A X ⃗ −1=0 is equivalent conditional extrema of the function ( X. 143.

<span class='text_page_counter'>(144)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. The Electronic Journal of Mathematics and Technology, Volume 7, Number 5, ISSN 1933–2823. ⃗ , λ )=( X ⃗ − X⃗ 0)2 + λ ( X⃗ T A X ⃗ −1) . The to considering the critical points for the function ƒ( X equation for finding λ is expressible in the form of 2. 2. 2. x0 y0 z0 + + =1. 2 2 2 λ λ λ (a+ ) (b+ ) (c+ ) a b c. (2). This equation is of sixth degree in λ . Since the center of the sphere is outside the ellipsoid; the equation has at least two real solutions but no more than 6 solutions. In this paper we consider the cases of two and four real roots. The equation (2) and [3] allow us to find the feet of perpendiculars dropped from the center of the sphere to the ellipsoid x0 y0 z0 X⃗H = , , . (3) −2 −2 1+ λ i a 1+ λ i b 1+ λ i c−2 These feet yield the radii of the sphere | X⃗Н − X⃗ 0 | at points of tangency. The radius increases i. (. ). i. when λ decreases. Therefore, corresponds to the largest and D corresponds to the smallest permissible values of λ . Intermediate values of λ determine points of self-intersection on the ⃗ on the surface of curve of intersection of the sphere and ellipsoid. We use the locus of points X the ellipsoid such that the normals at these points lie on a plane containing the centers of the sphere X X⃗ 0 . The equation of such points is given by and the ellipsoid, that is, on the plane O ⃗ ⃗ − X⃗ 0 ) X ⃗ X⃗ 0=0. In accordance with ([1], section 3.5.10, equation 3.5-22 of page 82) we (X denote the coordinates of the ellipsoid by. {. x=a sin u cos v , y=b sin u sin v , z=c cos u .. For some values of λ , the intersection curve is self-intersecting which we discuss in detail in Section 6.6. In the coordinates of the ellipsoid we obtain the following curve which has two branches: 2 2 2 2 a (c −b ) x 0 b (a −c ) y 0 2 2 c (a −b ) z 0 tan u= + . (4) cos v sin v. 3. Intersection curve of the surfaces. The main difficulty in the construction of the intersection curve is associated with changes in the number of roots of the equation determining the curve when the parameters of the problem are changed. We try to choose a coordinate system so that the solution is unique. We use the following approach. Let the zenith of the spherical coordinate system pass inside the intersection curve through the center of the spherical part. In other words, let the points on the sphere corresponding to θ =π and zenith θ =0 be divided by the intersection curve. Then for each ϕ in the interval ϕ ∈[ 0, 2 π ) there is exactly one value of θ ( ϕ )∈ ( 0, π ) . In this case it is easy to find points of the intersection curve on the sphere. The points are converted using internal coordinates of the ellipsoid. It is intuitively clear that the calculation accuracy of the spherical piece area increases if the axis passes near the center of the spherical piece. It is clear that for r ≈d the axis must pass through point X⃗Н (d ) , and for r ≈ D the axis must pass through the point X⃗Н ( D) . For the axis of the coordinate system for the sphere, a unit vector is in the direction of X⃗ 0 ⃗ A , where r−d ⃗ А= X⃗H ( d )+( X⃗H (D)− X⃗H (d )) . In complex cases such as the one discussed in Section 6.6 D−d. 144.

<span class='text_page_counter'>(145)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. we choose a point A manually. For the basis of the coordinate system X ' we choose the center of the sphere to be X⃗ 0 . The axis of the coordinate system X ' (x ' , y ' , z ' ) contains vectors ⃗ А− X⃗ 0 V⃗1=V⃗3 V⃗2 , V⃗2 , V⃗3 , where V⃗3= V⃗2 =( V⃗ 3 y ,−V⃗ 3 x , 0) . , (5) | ⃗А− X⃗ 0 | The corresponding transformed coordinate system has the form ⃗ =M X ⃗ ' + X⃗ 0 , where M =( V⃗1 , V⃗ 2 , V⃗3 ). X. (6). The equation of the ellipsoid is found by substituting (6) into (1): ⃗ 'T M T A M X ⃗ '+ 2 X⃗T0 A M X ⃗ ' + X⃗ T0 A X⃗ 0−1=0 . X. (7). We write the ellipsoid in the scalar form 2. 2. 2. 2. a 11 ( x ' )+a 22 ( y ' )+a 33 ( z ' )+ 2( a12 x ' y ' + a13 x ' z ' +a 23 y ' z ' + a10 x ' + a 20 y ' + a 30 z ' )+ a 00 r =1 , where a ij =U Ti U j ,U T0 =(. x0 y0 z0 V ix V iy V iz T , , ) , U i =( , , ). a r b r cr a b c. 2. 2. 2. 2. 2. 2. 2. 2. 2. V 1x V 1y V 1z V 2x V 2 y V 2 z V 3x V 3 y V 3z In other words, a 11= 2 + 2 + 2 , a22= 2 + 2 + 2 , a 33= 2 + 2 + 2 , a b c a b c a b c a 12 =. V 1 x V 2 x V 1 y V 2 y V 1z V 2z V V V V V V + + , a 13 = 1 x 2 3 x + 1 y 2 3 y + 1z 2 3z , 2 2 2 a b c a b c. a 23=. V 2 x V 3x V 2 y V 3 y V 2z V 3z x0 V 1 x y0 V 1 y z0 V 1 z + + , a 10= 2 + 2 + 2 , 2 2 2 a b c a r b r c r 2. a 20=. 2. 2. x0 V 2 x y0 V 2 y z0 V 2 z x0 V 3 x y0 V 3 y z0 V 3 z x0 y0 z0 + 2 + 2 , a 30= 2 + 2 + 2 , and a 00= 2 2 + 2 2 + 2 2 . (8) 2 a r b r c r a r b r c r a r b r c r. Using the substitution ([1], section 3.1.6, equation 3.1-3 of page 60). {. x '=r sin θ cos ϕ , y '=r sin θ sin ϕ , z ' =r cos θ ,. (9). we obtain the following equations relating θ and ϕ : 2. 2. 2. 2. 2. 2. a 11 sin θ cos ϕ +a 22 sin θ sin ϕ + a 33 cos θ + 2(a 12 sin θ sin ϕ cos ϕ +a 13 sin θ cos θ cos ϕ )+ +2(a 23 sin θ cos θ sin ϕ +a 10 sin θ cos ϕ +a 20 sinθ sin ϕ + a 30 cos θ )+a 00=0 , sin2 θ (a 11 cos 2 ϕ + a 22 sin2 ϕ + 2 a 12 sin ϕ cos ϕ )+ a33 cos 2θ + 2sin θ cos θ (a13 cos ϕ + a 23 sin ϕ )+ +2 sin θ ( a10 cos ϕ + a 20 sin ϕ )+a 30 cos θ +a 00=0 ,. {. (10). 2. 1−t ≥0, 2 1+t 2t cos θ = , 1+ t 2. sin θ =. Using the substitution. (11). we obtain the following equation m4 t 4 +(4 a 30−m2 )t 3 + 2(2 a 33−m1 +a 00−r −2 )t 2 +(4 a 30 +m2 )t +( m4 +2 m3 )=0 ,. 145. (12).

<span class='text_page_counter'>(146)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. The Electronic Journal of Mathematics and Technology, Volume 7, Number 5, ISSN 1933–2823. where m1=a11 cos2 ϕ + 2 a 12 sin ϕ cos ϕ +a 22 sin 2 ϕ ,. m2=4(a 13 cos ϕ + a 23 sin ϕ ) , −2. m3=2(a 10 cos ϕ + a 20 sin ϕ ) , m4=m1−m3+ a 00−r , and ϕ ∈[ 0, 2 π ) . The intersection curve on the sphere consists of points satisfying equation (12). Since any point of the intersection curve also belongs to the ellipsoid, we find its coordinates in the coordinate system X ' by (12) and transform into the coordinate system X using (6). The internal coordinates of the ellipsoid (u , v ) are then. {. u=arccos. z , c. x v =arccos sign( y) , v ∈(− π , π ] . a sin u. (13). The equation of the intersection curve in the coordinates of the ellipsoid has the form ƒ( u , v)=( a sin u cos v− x 0)2 +(b sin u sin v− y 0 )2+(c cos u− z 0)2 −r 2=0 .. (14). If both distances from the sphere center X⃗ 0 to the vertices (0 , 0 ,−c) and (0 , 0 , c) are less than r or both distances are greater than r , there is a range of v ∈( v min , v max ) , for which equation (14) has two real solutions. Equation (14) has one solution for v=v min and v=v max . Outside this range, equation (14) does not have real solutions. In this case it is necessary to know the range of the variable v .. Figure 1: A view of the solid of the intersection along z axis for r = 8.1 (left) and r = 8.3 (right) The Figure 1 shows the view of the solid of the intersection along z axis for r = 8.1 (left) and r = 8.3 (right), respectively. We see yellow ellipsoid, blue sphere, and red intersection curve. The axis of the coordinate system X ' (x ' , y ' , z ' ) contains vectors V⃗1 , V⃗ 2 (brown) and V⃗3 (red) with the origin in the center of the sphere X⃗ 0 . The axes x (y) of the coordinate system of the ellipsoid is green (blue) and has origin in the center of the ellipsoid point O. The axes z projected in the point O. When the center of the sphere is at X⃗T0 =(3.2 , 4.0 , 2.4) , the radius is 8.1, and the center of the ellipsoid is at O⃗T =(0, 0,0) and semi-axes are (2,3,4), the intersection curve covers the z axis, and the center of the ellipsoid is being projected inside the blue area, which is part of the surface of the sphere. The parameter v accepts any value v ∈[ 0 , 2 π ) . This situation corresponds to Figures 8, 9, and 10 (middle figures) for r = 6, r = 7, and r = 8, respectively. In the case of r = 8.3, the intersection curve (red) does not cover the z axis, and the center of the ellipsoid is being projected outside the blue area. The parameter v shall vary in the range of [v min , v max ]. This situation corresponds to the middle figures of Figures 4 to 7 and 11. The intersection curve is closed in the. 146.

<span class='text_page_counter'>(147)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. The Electronic Journal of Mathematics and Technology, Volume 7, Number 5, ISSN 1933–2823. u-v plane. It is worth noting that at points when v=v min or v=v max , the gradient vector of the function has a component only along the v axis. Consequently, we obtain the equation  ƒ (u , v ) ⃗ as =0 which we rewrite using coordinates X u 2 c (15) x ( x −x 0)+ y ( y− y 0)+( z−z 0)( z − )=0 . z In practice it is convenient to solve this equation together with the equations of the sphere and ellipsoid and find (u k , v k ) using (x k , y k , z k ), k=1,2 and the relations (13).. 4. Basic Formulas. Let us consider the equations for the region on a quadric surface that is bounded by a given curve. Let S 1 be a smooth three dimensional surface of the form ƒ( u , v)=0, where u and v range over some region Г with v in the interval [v min , v max ] and u in the interval [u1 ( v) ,u 2 (v)]. The surface is defined parametrically by ( x (u , v) , y (u , v) , z (u , v )) . A region being a portion of the surface corresponding to the mentioned region is 2 2 2 x y z s=∬ J du dv , J =√ EG−F 2 , where E=( ) + ( ) +( ) , u u u (Г ) 2 2 2 x  x  y  y z z x y z F= + + . G=( ) + ( ) + ( ) , u v u v u v v v v For all quadric surfaces this expression is integrated with respect to u . Case 1 x=r sin θ cos ϕ , y=r sin θ sin ϕ , In case of a sphere, we have ƒ( x , y , z )=x 2+ y 2+ z 2−r 2=0, 2 z=r cos θ , J =r sin θ . We integrate this equation to obtain ϕ. max. s= ∫. θ 2( ϕ ). ∫. ϕ min θ (ϕ ) 1. ϕ max. 2. r sin θ d θ d ϕ =r. 2. ∫ ( cosθ 2 (ϕ )−cosθ 1 (ϕ ))d ϕ .. ϕ. (16). min. Case 2 2. In case of an ellipsoid, we have ƒ( x , y , z )=. 2. 2. x y z + 2 + 2 −1=0 , 2 a b c. x=a sin u cos v , y =b sin u sin v , z=c cos u , J =sin u √ a2 b 2 cos 2 u+c 2 sin 2 u( a 2 sin 2 v+b2 cos 2 v) . Let t=cos u , Then. h( v )=a 2 sin2 v+ b2 cos 2 v ,. H (v )=a 2 b 2−c 2 h(v) ,. h1 (v)=√ H ( v).. J dt=√ t 2 a 2 b2+ c 2 (1−t 2 )h (v )dt .. 2 2 Let g (t , v)=t √ c h(v )+ H (v )t +. c 2 h( v) ln (h 1( v) t+ √ c 2 h (v )+ H (v )t 2 ). Then we have h1 (v). v max sin u2(v). v max. 1 ( g (sin u2 (v) , v)−g (sin u 1 (v )) , v) dv . (17) ∫ 2∫ v sin u (v) v We use formulas (16) and (17) to find the surface areas of the intersection solids bounded by the curve.. √t 2 a 2 b 2+ c2 (1−t 2) h( v) dt dv=. s=∫ min. 1. min. 147.

<span class='text_page_counter'>(148)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 5 Integration method: Examples 5.1. We consider the sphere of radius 2 whose center is at (0,0,5), and the ellipsoid has its semi-axis (2,3,4) and center is at (0,0,0) (see [6]). We note that θ =0 corresponds to the z-axis for the sphere, and note that (θ , ϕ ) is chosen such that θ defined by equations (11) and (12), is continuous. The curve of intersection of the sphere and ellipsoid is unique for any ϕ . The area of the portion of the sphere inside Figure 2: The solid of intersection, example 5.1 the ellipsoid is then 2 π θ (ϕ ). S sp =∫ 0. ∫. 2π 2. r sin θ d θ d ϕ = r. 0. 2. ∫ (1−cos θ (ϕ ))d ϕ .. (18). 0. The integration can be approximated using a constant increment ϕ i=. 2π i . We find θ ( ϕ i ) n. from (12). The integral sum according to Simpson's formula is S (n)=. 4π r 3n. 2. n. ∑ k i (1−cos θ (ϕ i )) , k 2 i=1, k 2 i+ 1=2 .. (19). i =1. The accuracy of this approximation is proportional to n−5 . Therefore, a relative accuracy of 10–6 is obtained by using at 35-50 calculation points. The calculation time is less than 10 seconds. The distance from the center of the sphere X⃗ 0 to the vertex (0 , 0 , c) is smaller than the radius of the sphere. Therefore, the vertex (0 , 0 , c) and u=0 belong to the required surface. The distance from the center of the sphere X⃗ 0 to the opposite vertex (0 , 0 ,−c) is larger than the sphere radius. So the vertex (0 , 0 ,−c) and u=π is outside the surface. The surface area of the portion of the ellipsoid inside the sphere calculated by formula (17), where cos u2 ( v) is 1. Then 2π. S el =. 1 ∫ ( g (1, v)−g (cos u( v) , v)) dv . 2 0. (20). The total integral consists of the area of the curvilinear triangles for which Using Simpson’s formula we see that S (n)= where v i=. 2π i , n. 2π 3n. n. ∑ k i ( g (0, v i)−g (cos u( v i ), v i )) ,. (21). i=1. k i=1 if i is even, and k i=2 if i is odd.. The accuracy of the summation is again proportional to n−5 . If the number of calculation points is greater than 33, the error in the calculation is significantly less than 10−8 . This example focuses on how to verify calculation accuracy since the integrals can be approximated in several ways. For example, in [2, Example 1], the area of the relevant portion of the sphere is found to be 5.403 and the area of the relevant portion of the ellipsoid is 5.821. We note that the exact solution for the surface area of the sphere defined in this section has the 11 significant figure approximation to 5.4028467054, and we obtain an answer of 5.4028467060 by using the standard calculation from this section when 152 points are used. Similarly, the exact solution of the surface area for the ellipsoid has the 11 significant figure approximation to 5.8210351042, and we obtain an answer of 5.821035103 by standard calculation mentioned in this section when 152 points are used. 148.

<span class='text_page_counter'>(149)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. 5.2. Assume the center of a sphere of radius r = 2.2573 is located at X⃗ 0 =(1,2 ,3) , and the ellipsoid semi axes are (2, 3, 4) (see [7]). The calculation is performed as described in section 5.1. The coordinate system for the sphere is set automatically by the equation (5). We find the surface area belonging to the ellipsoid to be approximately 13.8364, and the surface area belonging to the sphere to be approximately 13.83697. These values are in close agreement with those given in [2, Example 2], where it was reported that the surface areas for ellipsoid and sphere, when r = 2.2574, are approximately 13.827 and 13.838, respectively. We assume the relative error in the calculation is based on the number of points n and the formula | S ( n)−S | δ (n)= , where S is the true value of the area. If the parameter n 2 δ (n) is constant, S the accuracy of the calculation is of order n−2 . Under this assumption, the estimation of the true value of the area S is obtained by the formula S (2 n)−S (n) S ≈ S (2 n)+ . (22) 3 For the area of the ellipsoid, the relative error in the present calculation δ (n) is approximately −2 n , and it should decrease with increasing n if the accuracy is higher. As shown in Table 1, the parameter n 2 δ (n) is approximately constant. n Ellipsoid δ (n) n Sphere δ (n) n. 2. 2. %. 52. 152. 302. 602. 1.5. 1.5. 1.6. 1.4. 0.0005. <0.0001. <0.0001. <0.0001. Table 1. Figure 3: The solid of intersection, example 5.2. 6. Integration issues. This section discusses important details of the integration methods used to determine the surface areas of the solid of intersection. These issues include the choice of the integration steps and increments, the manner in which certain extreme regions in the integration domains are treated, and the different summation methods used to obtain approximate values for the relevant integrals. 6.1. Solid of Intersection. Assume the center of a sphere is located at X⃗ 0 =(3.2 , 4, 2.4) and the ellipsoid semi axes are (2, 3, 4). The calculation of the area of the portion of the sphere inside the ellipsoid is performed as in the previous examples. For r = 2.9 the ellipsoid does not have a vertex which belongs to the solid of the intersection. So we need to use formula (17) for the calculations. The integral sum is determined by the fragments of the integration area. The fragmentation for r = 2.9 is shown schematically in the middle graph of Figure 4. It consists of a number of strips and the two end zones, shown in blue and. 149.

<span class='text_page_counter'>(150)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. The Electronic Journal of Mathematics and Technology, Volume 7, Number 5, ISSN 1933–2823. red,. respectively.. The. integral. 6.2. Choice of the integration step. sum. contains the areas of n curved strips v i +1 +v i and two segments of a circle, one of which v ∈[v i , v i+1 ] , u ∈[u 1 (v i +1/ 2) , u2 ( v i+1 /2 )] , vi +1 /2= 2 is red and located between v=v min and v 1 , and the other is located between v=v n and v=v max , which is shown in blue. The typical shape of the integration domain somewhat resembles that of a circle. In order to place the calculated points fairly evenly on the curve we use the formula: v +v v −v πi (23) v i= max min + max min cos . 2 2 n+ 1 To check the accuracy with different choices of the integration model we carried out studies for the 2 randomly chosen function ζ ( x , y )=−sin ( x+ 2 y)cos (3 x+ 2 y ) y . We used some nontrivial functions and result was the same. We evaluated the integral. ∫. I= 2. 2. x + y ≤1.  ζ (x , y ) dx dy . y. The value of the integral calculated using Maple, is I ≈0.41992728 . For each xi we calculate two 2 2 values ζ i=ζ ( x i ,−√ 1−x i ) , and ζ ˚ i=ζ ( x i , √ 1−x i ). The difference between them is Δ ζ i =ζ ˚ i−ζ i , Δ ζ 1 =Δ ζ n +1=0 , using which we then find the integral sum. Table 2 shows the results of the calculations. Line 2 corresponds to the simple integral sum, n 2 I 1 (n)=∑ h Δ ζ i , where h= =x i +1−x i . Line 3 corresponds to the Simpson integral sum n 1 n 2 h I 2 (n)=∑ k i Δ ζ i , where h= , k 2 j =2, and k 2 j+1=4 . Line 4 corresponds to the integral n 1 3 n−1 Δ ζ i +1 +Δ ζ i 2 2 sum I 3 (n)=∑ ( x i +1−x i )+ Δ ζ 1 ( x 1+ 1)+ Δ ζ n (1−x n ). We performed numerical 2 3 3 1 simulations using different numbers of points n and find the relative error in the calculation based I − I k (n) on the number of points, that is, δ k (n)= , being expressed as a percentage. It is seen I that our model calculation with a constant step leads to very large errors. The calculation of the selected variable step has significantly greater accuracy and typically has accuracy of order n−2 . n. 25. 50. 100. 200. 2. 3.96% (2477). 1.5% (3729). 0.54% (5420). 0.19% (7761). 2. 3.96% (2477). 2.31% (5788). 0.85% (8585). 0.31% (12400). 2. 0.160% (100). 0.052% (130). 0.014% (147). 0.0039% (156). δ 1 (n δ 1) δ 2 (n δ 2 ) δ 3 (n δ 3). Table 2 6.3 Estimation of the Area of the Extreme Portions of the Integration Domain We turn our attention to an extreme portion of the integration domain located between v=v min and v 1 . We approximate the intersection curve ƒ( u , v)=0 using a quadratic function which passes through the points (v min , u(v min )) , (v 1 , u2 (v 1)), (v 1 , u1 (v 1 )). We use the following 150.

<span class='text_page_counter'>(151)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. The Electronic Journal of Mathematics and Technology, Volume 7, Number 5, ISSN 1933–2823. formula to approximate the area of the region of the parabola, which is used to approximate the surface area of the ellipsoid as follows: 2 ds el ≈ ( g (cos( u2 ( v 1)) , v 1)−g (cos (u 1 (v 1 )) , v 1))( v 1−v min ). (24) 3 We estimate the area for the domain of integration between v=v n and v=v max . 6.4. Integral sum formula x i+ 1. We consider a term of the integral sum dS i= ∫ y ( x) dx for a variable integration step. We xi. approximate the integrand in the interval [ xi , x i+ 1 ] using a quadratic function and require that the function interpolate the points ( x i , y i ) and ( x i +1 , yi +1) and that it is close to the points (x i−1 , y i−1) and (x i+ 1 , y i+ 1) in a least squares sense. Let y e ( x) be estimation for y (x ): y i +1− y i 2 (25) y e =μ (x− x i) +( −μ (x i +1+ x i))( x i+1 −x i)+ y i , x i +1−x i ξ ( x i−1) η (x i−1 )+ ξ ( xi + 2) η (x i+ 2 ) where , μ =− 2 2 ξ (x i −1 )+ ξ ( x i+ 2 ) 2 ξ ( x)=x + ( x i+ 1+ xi ) x−x i+ 1 x i , x −x x −x η ( x )= y i+ 1 i − yi i + 1 − y ( x). x i+ 1− x i x i+ 1−x i x y +y μ dS i≈ ∫ y e (x )dx= i +1 i ( x i+1− x i)− ( x i+1 −x i)3 . (26) 2 6 x i+1. i. With the integral error of h. 2. replaced by the integral sum trapezoidal method we obtain x y +y dS i= ∫ y ( x)dx≈ i+ 1 i (x i+ 1−x i ). 2 x i+ 1. (27). i. n. We estimate the sum of the form S =dS (0)+ ∑ dS (i)+ dS (n+1), where i =1. ds + ds i+1 2 dS (0)= ds 1 (v 1−v min) , dS (i)= i (v i +1−v i ), 3 2 v +v v −v 2 iπ dS (n+ 1)= ds n +1( v max −v n) , v i= max min − max min cos , and obtain 3 2 2 n+1 ds i= g (cos (u min ( v i) , v i ))− g (cos (u max ( v i) , v i )) . (28) In the calculations the coordinate system is defined by the equations of (4) and (5). Table 3 shows S (n) −1) , S ≈2.209234 , and n 2 δ (n) for r =3.1. the values of the parameters δ (n)=100 ( S n. 25. 50. 100. 200. S. 2.203862. 2.207886. 2.208882. 2.209146. δ (n). 0.24%. 0.061%. 0.016%. 0.004%. 1.52. 1.53. 1.60. 1.60. δ (n) n. 2. Table 3. 151.

<span class='text_page_counter'>(152)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. 6.5. Results. We perform calculations for the sphere with fixed center and a fixed ellipsoid. We change the radius of the sphere and the method of calculating the area of the ellipsoid (as well as the method of rendering its image in GInMA). In separate calculations, instead of the ellipsoid (a ,b , c) and the sphere ( k ,l , m) we use the ellipsoid (a , c , b) and the sphere ( k , m , l). We found the distance from the point X 0 to some of the vertices of the ellipsoid to be d ≈2.879132116 , D≈8.770649392. The closest vertex to the point X⃗ 0 is at (0 , b ,0) , a distance of d min ≈4.123105626 . The distance to the vertex (0 , 0 , c) is d с ≈5.179880467 . The maximum distance to the vertex (0 , 0 ,−c) is 8.197560613. The calculation results are made in [8] and shown in Figures 3-10 and Table 4. In the first column of Table 4, the specification of the ellipsoid and the radius of the sphere are given. S (2 , 3, 4) corresponds to a=2 , b=3, c=4 , and to the center of the sphere at the point T ⃗ X 0 =(3.2 , 4.0 , 2.4). S (2 , 4, 3) corresponds to the change of the original coordinate system T axes for a=2 , b=4, c=3, and X⃗ =(3.2 , 2.4 , 4.0). Columns 2-4 correspond to different 0. numbers of calculation points. Column 2 shows the calculation using 50 points, column 3 using 100 points, and column 4 using 200 points. Column 5 is obtained by extrapolation of formula (22). The top number in each cell gives the surface area of the ellipsoidal piece of the intersection solid while the lower number shows the surface area of the spherical piece. The pairs of calculations with the same radius for the sphere show how the accuracy of the calculation changes. For the radii r =4.5 and r =5, we have d min < r≤d c , and the intersection curve does not separate the vertices in the coordinate system for a=2 , b=3, c=4. At the same time, in the coordinate system S ( 2, 4,3) , the intersection curve divides the vertices. Therefore, the accuracy of calculations with a small number of calculation points varies considerably but the extrapolated results are the same. The relevant figures are given after Table 4. Each figure contains three images. The left image obtained using Maple shows the curve of intersection using the coordinates of the sphere (θ , ϕ ) , with θ located on the horizontal axis and ϕ located on the vertical axis. The curve is of the same type in all of the figures; exactly one value θ ( ϕ )∈ ( 0, π ) exists for any ϕ ∈[ 0, 2 π ) . The center image, obtained using Maple, shows the intersection curve in the coordinates of the ellipsoid (u , v ) , with u located on the horizontal axis and v located on the vertical axis. For small and large radii the curve is close to a circle. For intermediate radii v ∈[ 0,2 π ) in order for the curve to be continuous, it must be the case that v ∈(−π , 2 π ) , and values that differ by 2 π correspond to the same point on the surface. The right image, obtained using GInMA, shows the solid of the intersection. For small radii, for example r =2.9 , the intersection solid looks like a disk and the surface area of the ellipsoid piece is slightly smaller than that of the spherical piece. By increasing the radius the difference between the surface areas decreases monotonically and when r ≈3.095 the surface areas become the same. When the radius is approximately d min the intersection solid is located close to the axis of ordinates. When r =d min the intersection curve passes through the point (0, b , 0) . Furthermore, the intersection solid monotonically becomes the ellipsoid. Note that in the entry in Table 4 for r =5 and S (2 , 3, 4). In this case the border does not separate the ellipsoid vertices, the calculation accuracy is low and the correct result is obtained only by extrapolation or by using a number of points much greater than 300. On the other hand, when. 152.

<span class='text_page_counter'>(153)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. The Electronic Journal of Mathematics and Technology, Volume 7, Number 5, ISSN 1933–2823. T S (2 , 4, 3) , X⃗0 =(3.2 , 2.4 , 4.0) and r =4.5 , 5 or 6, the boundary separates the vertices, the accuracy of computation will be achieved when n = 100. In other words, the respective portions of the surface areas for ellipsoid and sphere stay unchanged when n ≥ 100 in this case. On the other hand, we note for r =7 in both cases, the intersecting curve runs between the vertices of the ellipsoid, the accuracy for both cases stays the same.. n. 50. 100. 200. ∞. S ( 2 , 3, 4) r =2.9 T X⃗ =(3.2 , 4.0 , 2.4). 0.202102 0.20228133. 0.202193 0.20228133. 0.202217 0.20228133. 0.202225 0.20228133. S ( 2 , 3, 4) r =3.095 X⃗T =(3.2 , 4.0 , 2.4). 2.156223 2.15745038. 2.157192 2.15745038. 2.157446 2.15745038. 2.157531 2.15745038. S (2 , 3, 4) r =4 T X⃗ =(3.2 , 4.0 , 2.4). 12.844892 12.040128. 12.850634 12.040128. 12.852143 12.040128. 12.852643 12.040128. S ( 2 , 3, 4) r =4.5 T X⃗ =(3.2 , 4.0 , 2.4). 19.996242 17.327758. 20.005151 17.327758. 20.007496 17.327758. 20.008278 17.327758. S (2 , 4, 3) r =4.5 X⃗T =(3.2 , 2.4 , 4.0).. 20.008265 17.327758. 20.008301 17.327758. 20.008301 17.327758. 20.008301 17.327758. S ( 2 , 3, 4) r =5 X⃗T =(3.2 , 4.0 , 2.4). 28.124322 21.8750020. 28.136841 21.87500120. 28.140160 21.87500120. 28.141237 21.87500120. S (2 , 4, 3) r =5 T ⃗ X 0 =(3.2 , 2.4 , 4.0).. 28.141305 21.875000. 28.141270 21.875001. 28.141270 21.875001. 28.141270 21.875001. S (2 , 3, 4) r =6 X⃗T =(3.2 , 4.0 , 2.4). 47.433904 27.004988. 47.431412 27.005004. 47.431404 27.005004. 47.431401 27.005004. S ( 2 , 4, 3) r =6 ⃗ X T0 =(3.2 , 2.4 , 4.0).. 47.431391 27.005004. 47.431404 27.005004. 47.431404 27.005004. 47.431404 27.005004. S (2 , 3, 4) r =7 X⃗T =(3.2 , 4.0 , 2.4). 70.265887 24.596703. 70.265878 24.59663903. 70.265878 24.59663903. 70.265878 24.59663903. S ( 2 , 4, 3) r =7 ⃗ X T0 =(3.2 , 2.4 , 4.0).. 70.265882 24.596704. 70.265878 24.596639. 70.265878 24.596639. 70.265878 24.596639. S ( 2 , 3, 4) r =8 X⃗T =(3.2 , 4.0 , 2.4). 94.5444568 13.562497. 94.544456 13.56254318. 94.544456 13.56254318. 94.544456 13.56254318. S ( 2 , 3, 4) r =8.5 X⃗T =(3.2 , 4.0 , 2.4). 105.925459 5.183001. 105.922890 5.18299733. 105.922218 5.18299733. 105.922000 5.18299733. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. Table 4. 153.

<span class='text_page_counter'>(154)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Figure 4: Intersection curves on the sphere and ellipsoid and intersection solid for r =2.9. Figure 5: Intersection curves on the sphere and ellipsoid and intersection solid for r =3.095. Figure 6: Intersection curves on the sphere and ellipsoid and intersection solid for r =4. Figure 7: Intersection curves on the sphere and ellipsoid and intersection solid for r =5. 154.

<span class='text_page_counter'>(155)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. Figure 8: Intersection curves on the sphere and ellipsoid and intersection solid for r =6. Figure 9: Intersection curves on the sphere and ellipsoid and intersection solid for r =7. Figure 10: Intersection curves on the sphere and ellipsoid and intersection solid for r =8. Figure 11: Intersection curves on the sphere and ellipsoid and intersection solid for r =8.5 155.

<span class='text_page_counter'>(156)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. We note two features of the GInMA images. Since the CAS of GInMA does not allow the solution of equations of degree to be higher than four, we need to perform two operations manually. In the second step of an active drawing in GInMA file. We need to put the points H and H' in positions to show perpendiculars to the surface of the ellipsoid passing through the point X⃗ 0 . The violet curve on the yellow ellipsoid shown on the left of Figure 12 is the locus of the point H and the blue curve is the locus for the point H'. Accordingly, the points H and H' allow the GInMA program to construct the spherical part inside the ellipsoid. At step 6 of an active drawing in GInMA file, we need to move the points A and B to the top and bottom of the intersection curve, respectively (see the right of Figure 12). These allow GInMA to fill the surface of the ellipsoid for cases when the vertices (0 , 0 , c) and (0 , 0 ,−c) are not divided by the intersection curve. We note that if these points are not on the top and bottom as seen in the middle of Figure 12, GInMA possibly can show only part of the ellipsoidal surface.. Figure 12: Active points in GInMA help to get correct solid of the intersection 6.6. The self-intersection point on the line of intersection We consider the center of a sphere located at X⃗T0 =(3, 4, 2) and the ellipsoid with semi-axes of (2,3,7). This case will be referred to as Solid 1. For comparison purposes, we call the Example 3 in [2], when the center of a sphere is at X⃗T0 =(3.1 ,3.35 , 2.35) and the semi-axes of the ellipsoid are (2,3,7.4), as Solid 2. To find the point of self-intersection for Solid 1, we solve the equation (2) for λ, and use it to find the radius of the sphere. It has four solutions. The smallest (rmin ≈ 2.50000) and the largest (rmax ≈ 10.45295) distance values define the range of the radius for which the intersection of the surfaces may exist. Radius r ≈ 7.519658 defines the point of self-intersection C with the coordinates (−0.57963, −2.29261, 4.03336). Solution r' ≈ 7.55098 determines the radius at which the second loop of the curve of intersection disappears. For the Solid 2 we obtain the smallest (rmin ≈ 2.19656) and the largest (rmax ≈10.86524) distance values, radius r ≈ 7.00206, the point of self-intersection C (−0.689727, −2.323140, 3.925523) and r' ≈ 7.15438. We refer to the point D on the right of Figure 12 and note that D is at the tangent of the intersecting curve and u=constant. At the point D, u has  ƒ (u , v ) =0 or extremal value. The corresponding equation can be obtained from the condition v. 156.

<span class='text_page_counter'>(157)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. ∣. x 2 a x− x 0 x− x 0. y 2 b y− y 0 y− y 0. ∣. z 2 c =0, or a 2 (x −x 0) y=b 2 x ( y− y 0). z −z 0 z−z 0+ r. The surface of the elliptical piece is calculated as in previous cases. The surface of the spherical piece is divided into two pieces within each of the loops. Since these two pieces have two respective acute angles at C (see right of Figure 13), we need to construct two separate coordinate systems for each loop. The z-axis we choose for each system should be close to the bisectors of the acute angle at C and the center of the loop.. Figure 13: Intersection curves on the sphere and ellipsoid (2, 3, 7) and intersection solid. We describe how we optimize the choices of A and B with the help of GInMA as follows: 1. We first select the points A and B in the interior of two separate intersecting loops respectively. 2. We drag the points A and B to achieve the best uniform shading of those two intersecting surface area of the sphere. 3. We use the direction X0A as the z-axis when calculating the portion of the surface of the sphere with GInMA, which contains the intersecting loop with point A in it. Next, we set the point F to be on the ray of X0A. Similarly, we use the direction X0B as the z-axis for the second loop and use GInMA to calculate the portion of the surface of the sphere, which contains the intersecting loop with point B in it. Finally, we set the point E to be on the ray of X0B. 4. We use these positions E and F in Maple for calculating the surface area for the sphere. We note the Maple file in [9], we use E as the pointE and F as the pointF. The surface area of the ellipsoidal piece is divided into three parts. Two parts are inside the intersection curve loops and the third is the remaining portion of the ellipsoidal surface. We define the area within the loops. The area of the intersection solid is obtained by subtracting the area within the loops from the surface area of the ellipsoid. We find the intersection curve on the ellipsoid by solving the set of initial equations under the condition u > uc for one loop and u < uc for the other loop, where uc is the coordinate of point C. Figures 13 and 14 show the appearance of the solid in space, the curve of intersection in the coordinates of the sphere and in the coordinates of the ellipsoid. Accuracy of the calculations is determined by the convergence of the solution when the number of calculation points is varied. Accuracy of the calculations is also determined by comparison with the results of [2] for Solid 2.. 157.

<span class='text_page_counter'>(158)</span> Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. Figure 14: Intersection curves on the sphere and ellipsoid (2, 3, 7.4) and solid of intersection. The set of calculations for Solid 1 and Solid 2 are shown in Table 5. We vary the number of the calculation points and show the results in table columns, where the area of the ellipsoid is shown in the upper value and the area of the sphere is shown in the lower value in each cell. We use equation (22) to obtain the values for infinity in the last table column. n Solid 1: S (2 , 3, 7) , X⃗T0 =(3, 4, 2) and r ≈ 7.519658. Solid 2: S (2 , 3, 7.4) , X⃗T0 =(3.1 ,3.35 , 2.35) and r ≈ 7.00206.. 100. 300. 550. ∞. 125.7601 28.8371. 125.5526 28.8109. 125.5003 28.8149. 125.48 28.816. 119.5152 32.2572. 119.2160 32.27038. 119.1462 32.27401. 119.123 32.2743. Table 5 These values are in close agreement with those given in [2, Example 3]. The surface area of the relevant portions for the ellipsoid and the sphere are respectively 118.88 and 32.44.. 7.. Methods of finding solutions. Most of the methods we describe in this paper apply numerical integration schemes based on Maple in conjunction with the powerful visualization program GInMA. A problem that arises lies in the fact that for complicated geometrical problems it is typical that relevant equations do not admit a unique solution. We can solve quite complicated equations with Maple but usually there is no assurance that we are using the correct root. In such case, we use GInMA visualization capability to eliminate such extraneous root(s). It is important that the same computational grid, which is used to calculate the area, is being used to paint the surface. An example of such a situation is shown in Figure 10 on the right, the intersection solid image when r =8. Three features of the solution can be seen in this case. Firstly, the half of the ellipsoid surface lying opposite the boundary curve is lost. Secondly, an issue arises that requires a formal decision. It arises in conjunction with covering the part of the ellipsoid located outside the intersection solid. Thirdly, the reference points on the surface near the intersection curve above H' have a big step. This is clear by the form of a blue sphere which “peeps” through the holes in the yellow surface of the ellipsoid and by the "ribbing" of this part of the ellipsoid surface. During the calculation of the area such ribbing corresponds to a rapid decrease in calculation accuracy when we reduce the number of calculation points. The equations in Maple and GInMA programs are written the same way and transferred from one program to another using “copy-paste” so the developer can be sure of the correctness of the. 158.

<span class='text_page_counter'>(159)</span> Applied Mathematics, Technology and Education Journal – No 02, 07/2017. calculation. Additionally, in deriving the equations of the intersection curve, the visual observation of the curve allows the developer to feel confident because the slightest breach is immediately visually observed (especially since the solution will be observed to jump from one branch to another). If the response can be observed, it is usually easier to find a "cure." During the creation of the Maple worksheets for this paper, step by step calculations and their GInMA visualizations have been performed. The worksheets demonstrate high performance and the ability to calculate the location of any variant of the sphere relative to the ellipsoid (assuming that its center lies outside the ellipsoid). This illustrates the power of the approach used.. 8.. Conclusions. A numerical procedure to quickly calculate the surface area of the intersection solid of a sphere and an ellipsoid has been discussed. Achieved accuracy of the calculation is close to δ (n)n 2∼1 and −5 δ (n)∼10 for 300 calculation points. The calculation time for one solid usually is less than a minute on a typical university computer. A method was proposed for the numerical integration based on distributing calculation points obtained using the cosine law. It was theoretically justified and numerically confirmed that the calculation accuracy is of order n−2 . It was demonstrated that the numerical results agree with our earlier results given in [2]. The ability to visualize the results of calculations using a curve or a surface greatly assists in the choice of when the defining equations have multiple solutions. This situation is typical for the numerical computation of problems associated with complicated spatial 3D constructions. Joint use of a CAS such as Maple and a powerful visualization program such as GInMA can significantly decrease the time for the development of the solution. The first step of the calculation is that of finding a range of radii for which the curve of intersection exists. This requires the solution of an equation of sixth degree and finding two of its real roots corresponding to the internal and external osculation of the ellipsoid and a sphere with variable radius and fixed center. Since GInMA currently allows only the solution of the fourth degree equation, an element of manual management is integrated in the solution. When possible, user should manually adjust the points so that the perpendiculars constructed from these points intersect with the center of the sphere. Thus these points become the bases of the perpendiculars dropped from the sphere center to the ellipsoid. These points can then be used to construct the solid of intersection. The accuracy of the calculation becomes significantly better if the vertices (0 , 0 , c) and (0 , 0 ,−c) are divided by the intersection curve. If the radius of the sphere is greater than the distance to some vertex but smaller than the distances to the vertices and it is advisable to rename the axes and to choose for the axis the one which passes through the vertex closest to the sphere’s center. Similarly, if the sphere radius is smaller than the distance to some vertex but greater than the distances to the opposite vertices, it is advisable to rename the axes using for the z axis the one passing through the vertex farthest from the sphere’s center. It transforms case shown in Figure 1 on the right in the case shown in Figure 1 on the left, transforms the range of v∈[vmin, vmax] to the range of v∈[0, 2π). Finally, we note that if the surface area of the intersection solid is substantially greater than the half of the ellipsoid (or the sphere), it is advisable to find the surface area of the remainder of the ellipsoid, find the total ellipsoid area and subtract remainder from the total ellipsoid area.. 159.

<span class='text_page_counter'>(160)</span> 9.. References. Tạp chí Toán ứng dụng, Công nghệ và Giáo dục – Số 02, 07/017. [1] G.A.Korn, and T.M.Korn. Mathematical Handbook for Scientists and Engineers. Definitions, Theorems, and Formulas for Reference and Review. DOVER PUBLICATIONS, INC. Mineola, New York. [2] S. Thompson, W.–C. Yang, and V. Shelomovskii. The Intersection of a Sphere and an Ellipsoid, A First Approach, Electronic Journal of Mathematics and Technology (eJMT), Issue 1, Vol.7, 2013. [3] W.–C. Yang, and V. Shelomovskii, Mean Value Theorems in Higher Dimensions and Their Applications, Electronic Journal of Mathematics and Technology (eJMT), Issue 1, Vol.6, 2012. Software Packages [4] [Maple] A product of Maplesoft, [5] [GInMA] GInMA, 2012, S. Nosulya, D. Shelomovskii, and V. Shelomovskii. http://deoma–cmd.ru/en/Products/Geometry/GInMA.aspx. Supplemental Electronic Materials All GInMA supplemental materials that accompany this paper can be used from figures. Install the GInMA software from the website and click on the picture. [6] V. Shelomovskii, Maple worksheet for section 5.1. [7] V. Shelomovskii, Maple worksheet for section 5.2. [8] V. Shelomovskii, Maple worksheet for section 6.5. [9] V. Shelomovskii, Maple worksheet for section 6.6.. 160.

<span class='text_page_counter'>(161)</span>

×