Skip to content

Commit

Permalink
revising...
Browse files Browse the repository at this point in the history
  • Loading branch information
jzstark committed Mar 25, 2024
1 parent 5ce6d27 commit 8e4a20e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 41 deletions.
4 changes: 2 additions & 2 deletions chapters/diffequation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ In this chapter we focus on the ODE and introduce what is it, how it can be solv

Generally, an ODE can be expressed as:

$$ F(x, y^{'}, y^{''}, \ldots, y^{(n)}) = 0.$$ {#eq:diffequation:ode-def}
$$ F(x, y^{'}, y^{''}, \ldots, y^{(n)}) = 0.$$ <!-- {#eq:diffequation:ode-def} -->

The differential equations model dynamic systems, and the initial status of the system is often known. That is called *initial values*.
They can be represented as:

$$y|_{x=x_0} = y_0, y^{'}|_{x=x_1} = y_1, \ldots ,$${#eq:diffequation:init}
$$y|_{x=x_0} = y_0, y^{'}|_{x=x_1} = y_1, \ldots $$

where the $y_0$, $y_1$, etc. are known.
The highest order of derivatives that are used in [@eq:diffequation:ode-def] is the *order* of this differential equation.
Expand Down
61 changes: 22 additions & 39 deletions chapters/maths.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,54 +25,37 @@ You can use these unary functions easily from the `Maths` module. For example:

The [@tbl:maths:basic_unary] lists these unary functions supported in this module.

------------ -------------------------------------------------------
Function Explanation
------------ -------------------------------------------------------
`abs` `|x|`

`neg` `-x`

`reci` `1/x`

`floor` the largest integer that is smaller than `x`
Function | Explanation
------------ | -------------------------------------------------------
`abs` | `|x|`
`neg` | `-x`
`reci` | `1/x`
`floor` | the largest integer that is smaller than `x`
`ceil` | the smallest integer that is larger than `x`
`round` | rounds `x` towards the bigger integer when on the fence
`trunc` | integer part of `x`
`sqr` | $x^2$
`sqrt` | $\sqrt{x}$

`ceil` the smallest integer that is larger than `x`

`round` rounds `x` towards the bigger integer when on the fence

`trunc` integer part of `x`

`sqr` $x^2$

`sqrt` $\sqrt{x}$
------------ -------------------------------------------------------
: Basic unary math functions {#tbl:maths:basic_unary}

### Basic Binary Functions

Unlike the unary ones, the *binary functions* take two floats as inputs and return one float as output.
Most common arithmetic functions belong to this category, as shown in [@tbl:maths:binary].

------------ -------------------------------------------------------
Function Explanation
------------ -------------------------------------------------------
`add` `x + y`

`sub` `x - y`

`mul` `x * y`
Function | Explanation
------------ | -------------------------------------------------------
`add` | `x + y`
`sub` | `x - y`
`mul` | `x * y`
`div` | `x / y`
`fmod` | `x % y`
`pow` | $$x^y$$
`hypot` | $$\sqrt{x^2 + y^2}$$
`atan2` | returns $$\arctan(y/x)$$, accounting for the sign of the
| arguments; this is the angle to the vector $$(x, y)$$ counting from the x-axis.

`div` `x / y`

`fmod` `x % y`

`pow` $x^y$

`hypot` $\sqrt{x^2 + y^2}$

`atan2` returns $\arctan(y/x)$, accounting for the sign of the
arguments; this is the angle to the vector $(x, y)$ counting from the x-axis.
------------ -------------------------------------------------------
: Binary math functions {#tbl:maths:binary}

### Exponential and Logarithmic Functions
Expand Down

0 comments on commit 8e4a20e

Please sign in to comment.