Embed presentation
Download to read offline

![2
可參考講義第 9 頁範例二程式,修改程式使用三層迴圈如下:
國立中央大學數學系
var("x,y")
...
for v1 in [ x , y ] :
for v2 in [ x , y ] :
for v3 in [ x , y ] :
if v1+v2+v3 == 2*x+y :
...
SymPy 在微積分上的應用 : 習題 3](https://image.slidesharecdn.com/py9-3-210320024206/85/Py9-3-2-320.jpg)
This document discusses using SymPy, a Python symbolic mathematics library, to verify that the partial derivatives of the function f(x,y) = x*y^2*ln(x^2) are the same regardless of derivative order. It provides code to calculate all combinations of partial derivatives with respect to x and y using nested for loops over the variables, and check if they are equal to 2x + y. It also notes that log(x) is equivalent to ln(x) in SymPy.

![2
可參考講義第 9 頁範例二程式,修改程式使用三層迴圈如下:
國立中央大學數學系
var("x,y")
...
for v1 in [ x , y ] :
for v2 in [ x , y ] :
for v3 in [ x , y ] :
if v1+v2+v3 == 2*x+y :
...
SymPy 在微積分上的應用 : 習題 3](https://image.slidesharecdn.com/py9-3-210320024206/85/Py9-3-2-320.jpg)