UTB Project
UTB Project
By group
Case 1 : functionalDerivative
APPLICATION1:
Declare y(x) as a symbolic function and define f as the integrand of S. Use f and y as the
parameters of functionalDerivative.
Application2:
Functional Derivative with Respect to Two Functions
Find the functional derivative of the functional
Declare u(x) and v(x) as symbolic functions, and define f as the integrand of S.
Specify a vector of symbolic functions [u v] as the second input argument in functionalDerivative.
G = functionalDerivative(f,[u v])
functionalDerivative returns a vector of symbolic functions containing the functional derivatives of
the integrand f with respect to u and v, respectively.
Prepared by : Reviewed by: Verified by: Approved by:
Case 2 :
vpaintegral
Numerical integration using variable precision
Syntax
vpaintegral(f,a,b)
vpaintegral(f,x,a,b)
vpaintegral(___,Name,Value)
Description
application 1 :
Code
syms x
vpaintegral(x^2, 1, 2)
ans =
2.33333
syms y(x)
Prepared by : Reviewed by: Verified by: Approved by:
y(x) = x^2;
vpaintegral(y, 1, 2)
ans =
2.33333
Case3:’
vectorPotential
Description
vectorPotential(V,X) computes the vector potential of the vector field V with respect to the vector
X in Cartesian coordinates. The vector field V and the vector X are both three-dimensional.
APPlication1 :
ans =
-(x*y^2*z)/2
-x^2*y*z
0
Compute the vector potential of this column vector field with respect to the vector [x, y, z]:
A(x, y, z) =
z*(2*y^2 + 18) - (16*z^3)/3 + (16*x*y*(y^2 + 6*x))/3
2*y*z*(- y^2 + 2*x)
0
Applicatioon 2 :
To check whether the vector potential exists for a particular vector field, compute the divergence of
that vector field:
syms x y z
V = [x^2 2*y z];
divergence(V, [x y z])
ans =
2*x + 3
If the divergence is not equal to 0, the vector potential does not exist. In this
case, vectorPotential returns the vector with all three components equal to NaN:
vectorPotential(V, [x y z])
ans =
NaN
NaN
NaN