We have defined function
as a set:
It means that
is the unique solution of
, we solve for as follows:
from to gives
, we numerically evaluate , using function ‘quad_qags’.
The result is visually validated in Fig. 2.
Note: ‘romberg’, another function that computes the numerical integration by
Romberg’s method will not work since it evaluates at
An alternate approach is to solve
as an initial-value problem of ODE using ‘rk’ , the function that implements the classic Runge-Kutta algorithm.
Fig. 4 for
Putting the results together, we have
However, we cannot solve
Exercise-1 Compute for .
Exercise-2 Explain why ‘rk’ cannot solve .
Instrumental Flying“, we defined as the inverse of and repectively.
To find the derivative of
(see Exercise-1) and (see Exrecise-2),
Similarly, to find
, since (see Exercise-3).
Exercise-1 Show that .
Exercise-2 Show that .
Exercise-3 Show that
Exercise-4 Differentiate directly (hint: see” Deriving Two Inverse Functions“).
An oasis awaits
The above image is created by
Omega CAS Explorer:
The governing equations are:
The polar coordinates
and can be converted to the Cartesian coordinates and using the trigonometry functions:
It follows that a figure specified in
can be plotted by ‘plot2d’ as a parametric curve:
It is possible to plot two or more parametric curves together:
An alternate is the ‘draw2d’ function, it draws graphic objects created by the ‘polar’ function:
Fig. 4 shows a graceful geometric curve that resembles a butterfly. Its equation is expressed in polar coordinates by
It is possible to combine two or more plots into one picture.
For example, we solve the following initial-value problem
and plot the analytic solution in Fig. 1.
We can also solve
numerically and plot the discrete data points:
Fig. 3 is the result of combining Fig.1 and Fig. 2.
It validates the numerical solution obtained by ‘rk’: the two figures clearly overlapped.
Besides ‘ode2’, ‘contrib_ode’ also solves differential equations.
While ‘ode2’ fails:
This is an example taking from page 4 of Bender and Orszag’s “
Advanced Mathematical Methods for Scientists and Engineers“. On the same page, there is another good example:
is a constant.
Using ‘contrib_ode’, we have
It seems that ‘contrib_ode’ is a better differential equation solver than ‘ode2’:
Even though it is not perfect:
From the examples, we see the usage of ‘contrib_ode’ is the same as ‘ode2’. However, unlike ‘ode2’, ‘contrib_ode’ always return a
list of solution(s). It means to solve either initial-value or boundary-value problem, the solution of the differential equation is often lifted out of this list first:
Exercise Solve the following differential equations without using a CAS:
(hint: Riccati Equation)
As far as I know, ‘bc2’, Maxima’s built-in function for solving two-point boundary value problem only handles the type:
For example, solving
But ‘bc2’ can not be applied to
since it is not the type of (*). However, you can roll your own:
An error occurs on the line where the second boundary condition is specified. It attempts to differentiate the solution with respect to
under the context that . i.e.,
which is absurd.
The correct way is to express the boundary conditions using ‘at’ instead of ‘ev’:
The following works too as the derivative is obtained before using ‘ev’:
Nonetheless, I still think using ’at’ is a better way:
: Solving Problem for .
arbitrarily, we generate the sequence recursively from :
It follows that for
Fig. 1 shows a CAS -aided solution using
Omega CAS Explorer:
, we rewrite as
We have used fact that
A proof is as follows:
then It means
Exercise-1 Prove by mathematical induction:
Consider the following set
, we have
if and only if ( Exercise-1),
From (1-2) and (1-3), we conclude:
defines a function.
Alternatively, (1-1) can be expressed as
It shows that
is the inverse of . Therefore, we name the function defined by (1-1) and write it as
Let’s look at another set:
For a pair
, we have
For another pair
does not implie . It means does not define a function.
However, modification of
It defines a function.
Rewrite (2-3) as
, we have
Notice that by (2-3),
Cleary, (2-5) is true if and only if
. For if , by ,
We name the function defined by (2-3)
as (2-4) shows that it is the inverse of
Deriving Two Inverse Functions” for the explicit expressions of and .
Without loss of generality, we assume that
By Lagrange’s mean-value theorem (see “ A Sprint to FTC“),
Exercise-1 Show that if and only if .
Instrumental Flying“, we defined function as
, we obtain
It means either
suggests (see Exercise-1), contradicts the fact that (see “ Two Peas in a Pod, Part 2“).
We also defined a
non-negative valued function :
It follows that either
For both expressions’ right-hand side to be valid requires that
. However, when ,
(see Exercise-2,3), contradicts (2).
See also “
A Relentless Pursuit“.
Exercise-1 Show that
Exercise-2 Without calculator or CAS, show that
Exercise-3 Prove (hint: see “ Two Peas in a Pod, Part 2“)