Function Repository Resource:

DualPart

Source Notebook

Get the dual part of a dual number

Contributed by: Jan Mangaldan

ResourceFunction["DualPart"][d]

gives the dual part of the dual number d.

Details

Dual numbers are hypercomplex numbers of the form a+bε, where a and b are real numbers, and ε satisfies the relation ε2=0.
In the expression a+bε, a is the real part and b is the dual part.
ResourceFunction["DualPart"] can be used on both real numbers and DualNumber objects.
ResourceFunction["DualPart"] automatically threads over lists.

Examples

Basic Examples (1) 

Find the dual part of a dual number:

In[1]:=
ResourceFunction["DualPart"][ResourceFunction["DualNumber"][-4, -3]]
Out[1]=

Scope (2) 

Evaluate numerically:

In[2]:=
ResourceFunction["DualPart"][ResourceFunction["DualNumber"][1.5, 0.8]]
Out[2]=

DualPart threads elementwise over lists and matrices:

In[3]:=
ResourceFunction[
 "DualPart"][{1.2, ResourceFunction["DualNumber"][1/2, 2/3], ResourceFunction["DualNumber"][0., -1.8]}]
Out[3]=
In[4]:=
ResourceFunction["DualPart"][( {
   {1, u},
   {v, ResourceFunction["DualNumber"][0, -1]}
  }\:f3a2)]
Out[4]=

Properties and Relations (1) 

The dual part of a real number is zero:

In[5]:=
ResourceFunction["DualPart"][E]
Out[5]=

Version History

  • 1.0.1 – 18 April 2022
  • 1.0.0 – 05 February 2021

Related Resources

License Information