分享兴趣、传播快乐、增长见闻、留下美好,大家好,这里是LearningYard学苑,今天小编为大家带来文章:在Mathematica中求偏导和极值。

用mathematica求一阶导数(28研读分享)(1)

今天学习的内容属于大学数学中的线性代数部分。首先,我们先了解一下什么是“求偏导”。在查阅了资料后,个人理解:“求偏导”这个说法在多元函数中用得多一些,比较常见的是在一个二元函数f(x,y)中求f对x或者对y的偏导。“求偏导”本质其实也是求导,而求导是一元函数中常用的数学知识。如y=f(x)=2x 3,对这个函数求导,可以得到的结果为2。这个结果的大小表现为一元函数y=f(x)随着x变化而变化的速率的大小。具体来说,y对x求一阶导,即y的变化量与x的变化量的比值的极限。而将这个概念扩展到二元函数甚至多元函数时,参考的定义如下:

用mathematica求一阶导数(28研读分享)(2)

图1

对这个概念的理解,可以参考下面这张图来看:

用mathematica求一阶导数(28研读分享)(3)

图2

在实际计算时,我们对f(x,y)求f’x(x0,y0),要将函数中所有的y看作一个常数。在几何空间中来看,求f’x(x0,y0)的几何意义就是求二元函数在某一点上沿着x轴的正方向作切线,求出来的偏导数可能是一个精确的数(切线的斜率)也可能是一个函数。如果是函数,我们还能继续求f(x,y)对x,y的二阶导数甚至三阶导数。同时,在二元函数中,函数的变化不是仅仅由x的变化而引起的,而是由众多变量的变化引起的。数学家们为了说明这种变化,提出了“全微分”的概念。

一元函数y=f(x)的微分表示为dy, dy=f’(x)*dx;其中f’(x)就是我们求出的一阶导数。

二元函数y=f(x1,y1)的全微分为dy, dy=f’(x1)*dx1 f’(x2)*dx2。

偏导数的表示:我们可以用f’(x),f’,y’或dy/dx来表示一元函数y=f(x)的导数;用f’1,f’2,dy/dx1,dy/dx2表示一阶偏导数。

可见,微分与导数的概念是互相关联的。

01练习求偏导

找几个例子练练手:

用mathematica求一阶导数(28研读分享)(4)

图3

上手之前,先了解一下对应的命令格式。在Mathematica中,求偏导的命令为

用mathematica求一阶导数(28研读分享)(5)

用mathematica求一阶导数(28研读分享)(6)

图4

练习的过程如下:

用mathematica求一阶导数(28研读分享)(7)

图5-1

用mathematica求一阶导数(28研读分享)(8)

图5-2

用mathematica求一阶导数(28研读分享)(9)

图6-1

用mathematica求一阶导数(28研读分享)(10)

图6-2

02 练习求隐函数的偏导数

我们通常看到的函数多是显函数的形式,比如y=3x x^2,这表示了y是x的函数。有了显函数,自然有隐函数的概念。而且,显函数是相对于隐函数来说的。

隐函数定义:隐函数是由隐式方程所隐含定义的函数。设F(x,y)是某个定义域上的函数。如果存在定义域上的子集D,使得对每个x属于D,存在相应的y满足F(x,y)=0,则称方程确定了一个隐函数。记为y=y(x)[1]。

也就是说,我们在对隐函数求偏导时,可能首先看到的是一个F(x,y)=0样式的方程,我们需要从方程中找出隐函数,然后将其表示为显函数的形式,进而对其求导。至于怎么找这个隐函数,我们可以通过下面的例子来感受一下。

我们需要提前了解的函数命令如下:

用mathematica求一阶导数(28研读分享)(11)

图7-1

用mathematica求一阶导数(28研读分享)(12)

图7-2

例题如下:

用mathematica求一阶导数(28研读分享)(13)

图8

操作过程为:

用mathematica求一阶导数(28研读分享)(14)

图9-1

用mathematica求一阶导数(28研读分享)(15)

图9-2

03练习求多元函数的极值

例题为:

用mathematica求一阶导数(28研读分享)(16)

图10

操作过程为

用mathematica求一阶导数(28研读分享)(17)

图11

英文学习

What I am studying today belongs to the linear algebra part of university mathematics. First, let's first understand what "seeking partial derivatives" is. After consulting the information, I understand: The term "seeking partial derivatives" is used more in multivariate functions. The more common one is to find the partiality of f against x or against y in a binary function f(x, y). guide. The essence of "seeking partial derivative" is actually seeking derivation, and derivation is commonly used mathematical knowledge in unary functions. For example, y=f(x)=2x 3, the derivative of this function, the result can be 2. The magnitude of this result is realized as the magnitude of the rate at which the unary function y=f(x) changes as x changes. Specifically, y takes the first derivative of x, that is, the limit of the ratio of the change in y to the change in x. When extending this concept to binary functions or even multivariate functions, the reference definitions are as follows:

figure 1

To understand this concept, you can refer to the following picture:

figure 2

In actual calculations, we find f'x(x0,y0) for f(x, y), and treat all y in the function as a constant. From the perspective of geometric space, the geometric meaning of finding f'x (x0, y0) is to find a binary function at a certain point along the positive direction of the x-axis as a tangent, and the partial derivative obtained may be an accurate number ( The slope of the tangent) may also be a function. If it is a function, we can continue to find the second derivative or even the third derivative of f(x, y) with respect to x, y. At the same time, in the binary function, the change of the function is not only caused by the change of x, but by the change of many variables. In order to explain this change, mathematicians put forward the concept of "total differential".

The differential of the unary function y=f(x) is expressed as dy, dy=f’(x)*dx; where f’(x) is the first derivative we found.

The total differential of the binary function y=f(x1,y1) is dy, dy=f'(x1)*dx1 f'(x2)*dx2.

Representation of partial derivatives: we can use f'(x), f',y' or dy/dx to represent the derivative function of the unary function y=f(x); use f'1, f'2, dy/dx1, dy/dx2 represents the first-order partial derivative.

It can be seen that the concepts of differential and derivative are interrelated.

01 Practice seeking partial derivatives

Find a few examples to practice hands:

image 3

Before getting started, first understand the corresponding command format. In Mathematica, the command to find the partial derivative is

Figure 4

The practice process is as follows:

Figure 5-1

Figure 5-2

Figure 6-1

Image 6-2

02 Practice finding partial derivatives of Implicit functions

The functions we usually see are mostly in the form of explicit functions, such as y=3x x^2, which means that y is a function of x. With the explicit function, the concept of implicit function is naturally derived. Moreover, the explicit function is relative to the implicit function.

Implicit function definition: An implicit function is a function implicitly defined by an implicit equation. Let F(x,y) be a function on a certain domain. If there is a subset D on the domain, so that for each x belonging to D, there is a corresponding y that satisfies F(x,y)=0, then the equation is said to determine an implicit function. Denoted as y=y(x)[1].

In other words, when we are seeking partial derivatives of implicit functions, we may first see an equation of F(x,y)=0 style. We need to find the implicit function from the equation and then express it as an explicit function The form of, and then the derivative of it. As for how to find this implicit function, we can get a feel for it through the following example.

The function commands we need to know in advance are as follows:

Figure 7-1

Figure 7-2

The sample questions are as follows:

Figure 8

The operation process is:

Figure 9-1

Figure 9-2

03 Practice finding the extreme value of a multivariate function

The sample title is:

Picture 10

The operation process is

Picture 11


由于篇幅有限,今天的分享就到这里啦!

感兴趣的同学可以留言与小编交流,

咱们下周见!

参考资料:

[1]在线新华词典.

英文翻译:Google翻译。

本文由LearningYard学苑整理并发出,如有侵权,请联系删除!

,