Download - Multivariable Calculus on Time Scales
Multivariable Calculus on Time Scales
Sinan Kapcak
Izmir University of Economics,Department of Mathematics, Sakarya Cad No:156
Izmir, TURKEYEmail: [email protected]
Unal Ufuktepe
Izmir University of Economics,Department of Mathematics, Sakarya Cad No:156
Izmir, TURKEYEmail: [email protected]
Abstract—Time scale analysis is the generalization of discreteand continuous analysis. In this research paper, we extend ourprevious study [6] and develop some important concepts; tan-gent planes and partial derivatives for multi-variable functionson time scales with Mathematica.
Keywords-partial delta derivative; time scale; mathematica;tangent plane;
I. INTRODUCTION
The theory time scales was initiated by Stefan Hilger
[5] in order to unify continuous and discrete analysis,
which has many potential for applications and has received
tremendous attention.
In this section and Section 2, we give some elements of
the time scales calculus for one variabe, and in Section 3
we briefly give some basics of multi-variable calculus on
time scales. We present some foundational definitions and
results, for more details, one can see [1], [3], [4].
Let T be a time scale which is nonempty closed subset
of real numbers. We define the forward and backward jumpoperators σ, ρ : T→ T respectively as follows:
σ(t) = inf{s ∈ T : s > t}, and
ρ(t) = sup{s ∈ T : s < t}.A point t ∈ T is called right-scattered, right-dense, left-
scattered, left-dense if σ(t) > t, σ(t) = t, ρ(t) < t, ρ(t) = tholds, respectively. The graininess μ : T→ [0,∞) is defined
by
μ(t) = σ(t)− t.
If T has left-scattered maximum then we define Tκ =
T−{maxT}, otherwise Tκ = T. If f is delta differentiable
at t ∈ Tκ then delta derivative of f is
fΔ(t) =
{lims→t
f(t)−f(s)t−s , μ(t) = 0;
f(σ(t))−f(t)σ(t)−t , μ(t) > 0.
We refer to the original work by Hilger [5] and the
recently appeared works can be found in [1], [2], [3].
II. THE TANGENT LINE WITH Mathematica
There are a few works on time scale analysis with
Mathematica. A.Yantır and U.Ufuktepe first defined
elements of time scales, and gave the delta derivative of
a function[7] for Mathematica, B.Balllard and B.Otegbade
from Baylor University created Time Scales Toolbox for
Matlab (2005), U.Ufuktepe and S.Kapcak improved their
previous works and got important symbolic results [6] for
Mathematica.
The codes of all Mathematica commands which have
written by the authors can be seen in the Appendix.
To describe a time scale in our Mathematica package,
we use a collection of three lists: a list of right-dense
left-scattered points, a list of left-dense right-scattered
points and a list of isolated points. For example, we
represent time scale T1 = [−2,−1] ∪ {2} consisting of one
closed interval and one isolated point by
In[1]:= T1={{-2},{-1},{2}};
We refer to [6] for more details about the symbolic and
numerical computations of jump operators, delta derivative
and delta integral as well as their visual representations.
In the rest of this section, we give the definition of
tangent line and visualize it by using our time scale
package.
We consider the geometric sense of delta differentiabil-
ity in simple variable functions on time scales. Consider
u = f(t) for t ∈ T. Let Γ be the curve represented by
the function f . Let t0 be a fixed point in Tκ. In this case
P0 = (t0, f(t0)) is a point on the curve.
Definition 1: A line � passing through the point P0 is
called the delta tangent line to the curve Γ at the point P0
if
a. � passes also through the point Pσ0 =
(σ(t0), f(σ(t0)).
2011 International Conference on Computational Science and Its Applications
978-0-7695-4404-5/11 $25.00 © 2011 IEEEDOI 10.1109/ICCSA.2011.28
41
b. if P0 is not an isolated point of the curve Γ, then
limP→P0, P �=P0
d(P, �)
d(P, P0)= 0,
where P is the moving point of the curve Γ, d(P, �)is the distance from the point P to the line �, and
d(P, P σ0 ) is the distance from the point P to the
point Pσ0 .[3].
Now, we plot the tangent line to the function
f : T1 → R, f(x) = x3 at the point x = −1 where
T1 is the time scale above:
In[2]:= TSTangentLine[T1,xˆ3,x,-1]
Out[2]= (see Figure 1)
�2 �1 1 2
�5
5
Figure 1. The tangent line to the curve f(x) = x3 at the point x = −1
III. FUNCTIONS WITH TWO VARIABLES ON TWO TIME
SCALES WITH MathematicaLet T1 and T2 be time scales. We define the product
T1 × T2 by
T1 × T2 = {(t, s) : t ∈ T1 and s ∈ T2}.Let σ1 and σ2 be two forward jump operators for T1 and T2,
respectively. Let ρ1 and ρ2 be two backward jump operators
for T1 and T2, respectively. We consider the surface S which
is defined by u = f(t, s) continuous function on T1 × T2:
the set of points
{(t, s, f(t, s)) : (t, s) ∈ T1 × T2}in three space.We refer to[4] for more details.
To get the visual representation of the product T1 × T2
by Mathematica, we first input T1 = [−1, 0] ∪ [1, 2] ∪ { 12}and T2 = [0, 1] ∪ [2, 3] ∪ [5, 6] ∪ {4, 8} as follows:
In[3]:= T1={{-1,1},{0,2},{1/2}};
In[4]:= T2={{0,2,5},{1,3,6},{4,8}};
We plot the set of points T1×T2 by using the command
In[5]:= DrawTimeScale3D[T1,T2]
Out[5]=(see Figure 2)
�1
0
1
2
TS1
0
2
4
6
8
TS2
�1.0
�0.5
0.0
0.5
1.0
Figure 2. T1 × T2
Let f : T1 × T2 → R such that f(t, s) = sin (t+ s).We plot this surface on T1 × T2 by using the command
TSPlot3D[T1,T2,f(t,s),t,s] where t ∈ T1,
s ∈ T2, as follows:
In[6]:= TSPlot3D[T1,T2,Sin[t+s],t,s]
Out[6]=(see Figure 3)
IV. PARTIAL DIFFERENTIATION ON TIME SCALES
Let f : T1 × T2 → R be a function. The first order delta
derivatives of f at a point (t0, s0) ∈ Tκ1 ×T
κ2 are defined by
∂f(t0, s0)
Δ1t= lim
t→t0, t �=σ1(t0)
f(σ1(t0), s0)− f(t, s0)
σ1(t0)− t
and
∂f(t0, s0)
Δ2s= lim
s→s0, s �=σ2(s0)
f(t0, σ2(s0))− f(t0, s)
σ2(s0)− s.
42
�1
0
1
2
TS1
�1
0
1
2
TS2
�1.0�0.50.00.5
1.0
Figure 3. The graph of f(t, s) = sin (t+ s) : t ∈ T1, s ∈ T2
To compute the partial delta derivative of
a given function at a given point, we use
the command PartialDeltaDerivative[{TS1,TS2},{t,s},f(t,s),var,p]. Here, the
partial delta derivative of f, a function of t ∈ TS1 and
s ∈ TS2, is taken with respect to var at the point p. Let
us get some results for the time scales T1 and T2 we have
given before, for a function f(t, s) = t2√s:
In[7]:= PartialDeltaDerivative[{T1,T2},{t,s},tˆ2 sˆ(1/2),t,{1,2}]
Out[7]= 2√2
In[8]:= PartialDeltaDerivative[{T1,T2},{t,s},tˆ2 sˆ(1/2),t,{1/2,3}]
Out[8]= 3√3
2
Now, let us give the definition of the tangent plane to a
surface defined on a product of two time scales.
Definition 2: A plane Ω0 passing through the point P0 =(t0, s0, f(t0, s0)) is called the delta tangent plane to the
surface S at the point P0 if
a. Ω0 passes also through the points
Pσ10 = (σ1(t0), s0, f(σ1(t0), s0)) and
Pσ20 = (t0, σ2(s0)f(t0, σ2(s0)));
b. if P0 is not an isolated point of the surface S , then
limP→P0, P �=P0
d(P,Ω0)
d(P, P0)= 0,
where P is the moving point of the surface S , d(P,Ω0) is
the distance from the point P to the plane Ω0, and d(P, P0)is the distance of the point P from the point P0.
The command DeltaTangentPlane[T1,T2,f(t,s),{t,s},p] plots the function f(t, s)
with t ∈ T1, s ∈ T2 at the point p. For the function
f(t, s) = sin(t + s), let us plot the tangent plane at the
point { 12 , 1}:
In[9]:= DeltaTangentPlane[T1,T2,Sin[t+s],{t,s},{1/2,1}]
Out[9]=(see Figure 4)
�1 0 1 2TS1
�10
12
TS2
�1.0
�0.5
0.0
0.5
1.0
�1
0
1
2
TS1
�1
0
1
2
TS2
�1.0�0.5
0.0
0.5
1.0
Figure 4. The delta tangent plane to the surface f(t, s) = sin(t+ s) atthe point ( 1
2, 1) at two different view points
V. CONCLUSION
There have been two mathematical framework to model
the population dynamics; continuous time overlapping gen-
eration models (differential equations), and discrete (differ-
ence equations). But there are some complex population
systems such that the continuous time and the discrete
43
time models may not really catch some of the properties
for certain specific population dynamics, in this case we
may need models on continuous-discrete-mixed time scales
(dynamic equations). Our future works will be focused on
the solutions of dynamic equations, system of dynamic
equations, and their orbits.
APPENDIX
QTimeScalenormal[TS_]:= Module[{intervals},intervals =Transpose[{Table[Sort[TS[[i]]],
{i, 2}][[1]],Table[Sort[TS[[i]]], {i, 2}][[2]]}];
checkdensepointforoneinterval[interval_, testpoint_] :=If[interval[[1]] < testpoint <interval[[2]], 1, 0];checkdensepointforTS[testpoint_] :=Function[checkdensepointforoneinterval[#, testpoint]] /@
intervals.Function[checkdensepointforoneinterval[#, testpoint]] /@intervals;
Which[Length[TS[[2]]] !=Length[TS[[1]]],Print["Length of rigth-denseleft-scattered and left-dense \
right-scattered points must be equal!"],Union[Sort[Flatten[TS]]] != Sort[Flatten[TS]],Print["Given intervals or isolatedpoints musn’t be intersected!"],Flatten[Transpose[{Sort[TS[[1]]], Sort[TS[[2]]]}]] !=Sort[Flatten[{TS[[1]], TS[[2]]}]],
Print["Given intervals are notproperly defined!"], \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(j =1\), \(Length[TS[\([\)\(3\)\(]\)]]\)]\
(checkdensepointforTS[\(TS[\([\)\(3\)\(\]\)]\)[\([\)\(j\)\(]\)]]\)\) != 0,
Print["Given intervals or isolatedpoints musn’t be \
intersected!!!"], Length[Flatten[TS]]== 0,Print["Time Scale can not be anempty set!"],Length[TS] != 3,Print["Length of the given list mustbe 3!"], 1 == 1, True
]]
QTimeScale[TS ]
:=If[(Length[TS] == 2 && Head[TS[[2]]]=== Symbol), True,
QTimeScalenormal[TS]]
checkelement[TS_, point_]:=Module[{criticalpoints, isolatedpoints,
RDLSpoints, LDRSpoints,intervals},criticalpoints = Sort[Flatten[TS]];isolatedpoints = Sort[TS[[3]]];RDLSpoints = Sort[TS[[1]]];LDRSpoints = Sort[TS[[2]]];intervals =Transpose[{Table[Sort[TS[[i]]],{i, 2}][[1]],
Table[Sort[TS[[i]]], {i, 2}][[2]]}];
checkdensepointforoneinterval[interval_, testpoint_] :=If[interval[[1]] < testpoint <interval[[2]], 1, 0];checkdensepointforTS[testpoint_] :=Function[checkdensepointforoneinterval[#, testpoint]] /@intervals.Function[
checkdensepointforoneinterval[#, testpoint]] /@intervals;
onpoint[point1_, point2_] := If[point1 == point2, 1, 0];checkRDLSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
RDLSpoints.Function[onpoint[testpoint, #]] /@ RDLSpoints;
checkLDRSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
LDRSpoints.Function[onpoint[testpoint, #]] /@ LDRSpoints;
checkisolatedpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
isolatedpoints.Function[onpoint[testpoint, #]] /@ isolatedpoints;
If[checkdensepointforTS[point] +checkRDLSpointforTS[point] +
checkLDRSpointforTS[point] +checkisolatedpointforTS[point] ==1,1, 0]
]
Sigmanormal[TS_, point_] :=
44
Module[{criticalpoints, isolatedpoints,RDLSpoints, LDRSpoints,intervals}, If[QTimeScale[TS] ===True,criticalpoints = Sort[Flatten[TS]];isolatedpoints = Sort[TS[[3]]];RDLSpoints = Sort[TS[[1]]];LDRSpoints = Sort[TS[[2]]];intervals =Transpose[{Table[Sort[TS[[i]]],{i, 2}][[1]],
Table[Sort[TS[[i]]], {i, 2}][[2]]}];
checkdensepointforoneinterval[interval_, testpoint_] :=If[interval[[1]] < testpoint <interval[[2]], 1, 0];
checkdensepointforTS[testpoint_] :=Function[checkdensepointforoneinterval[#, testpoint]] /@
intervals.Function[checkdensepointforoneinterval[#,testpoint]] /@ intervals;
onpoint[point1_, point2_] := If[point1 == point2, 1, 0];checkRDLSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
RDLSpoints.Function[onpoint[testpoint, #]] /@ RDLSpoints;
checkLDRSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
LDRSpoints.Function[onpoint[testpoint, #]] /@ LDRSpoints;
checkisolatedpointforTS[testpoint_]:=Function[onpoint[testpoint, #]] /@
isolatedpoints.Function[onpoint[testpoint, #]] /@ isolatedpoints;
nextcriticalpoint[testpoint_] :=criticalpoints[[First[First[Position[criticalpoints,testpoint]]] + 1]];
Which[point == Last[criticalpoints],point,checkdensepointforTS[point] == 1,point,
checkRDLSpointforTS[point] == 1,point,checkLDRSpointforTS[point] == 1,nextcriticalpoint[point],checkisolatedpointforTS[point] == 1,nextcriticalpoint[point]]]
]
Sigmasq[an_, t_] := Module[{sol, b},If[Limit[an[[1]], an[[2]] -> Infinity]< an[[1]] /. an[[2]] -> 1,If[t === Limit[an[[1]], an[[2]] ->Infinity], t,If[(Reduce[an[[1]] == t && an[[2]]> 0, an[[2]], Integers] ===
False && Head[t] === Real),Print["Given time scale doesn’tcontain the point ", t, "."],If[t === (an[[1]] /. an[[2]] ->1), t,sol = Solve[an[[1]] == t, an[[2]],InverseFunctions -> True];b = an[[1]] /. an[[2]] ->(an[[2]] - 1);First[FullSimplify[b /. sol]]]]
],If[t === Limit[an[[1]], an[[2]] ->Infinity], t,If[(Reduce[an[[1]] == t && an[[2]]> 0, an[[2]], Integers] ===
False && Head[t] === Real),Print["Given time scale doesn’tcontain tthe point ", t, "."],sol = Solve[an[[1]] == t, an[[2]],InverseFunctions -> True];b = an[[1]] /. an[[2]] -> (an[[2]]+ 1);First[FullSimplify[b /. sol]]]
]]]
Sigma[TS ,point ]
:=If[Length[TS] == 2, Sigmasq[TS, point],Sigmanormal[TS, point]]
Rho[TS ,point ]
:=Module[{criticalpoints, isolatedpoints,
RDLSpoints, LDRSpoints,intervals}, If[QTimeScale[TS] ===True,criticalpoints = Sort[Flatten[TS]];isolatedpoints = Sort[TS[[3]]];RDLSpoints = Sort[TS[[1]]];LDRSpoints = Sort[TS[[2]]];intervals =Transpose[{Table[Sort[TS[[i]]],{i, 2}][[1]],
Table[Sort[TS[[i]]], {i, 2}][[2]]}];
45
checkdensepointforoneinterval[interval_, testpoint_] :=If[interval[[1]] < testpoint <interval[[2]], 1, 0];
checkdensepointforTS[testpoint_] :=Function[checkdensepointforoneinterval[#,testpoint]] /@intervals.Function[checkdensepointforoneinterval[#,testpoint]] /@ intervals;
onpoint[point1_, point2_] := If[point1 == point2, 1, 0];checkRDLSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
RDLSpoints.Function[onpoint[testpoint, #]] /@ RDLSpoints;
checkLDRSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
LDRSpoints.Function[onpoint[testpoint, #]] /@ LDRSpoints;
checkisolatedpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@
isolatedpoints.Function[onpoint[testpoint, #]] /@ isolatedpoints;
prevcriticalpoint[testpoint_] :=criticalpoints[[First[First[Position[criticalpoints,testpoint]]] - 1]];
Which[point == First[criticalpoints],point,checkdensepointforTS[point] == 1,point,checkLDRSpointforTS[point] == 1,point,checkRDLSpointforTS[point] == 1,prevcriticalpoint[point],checkisolatedpointforTS[point] == 1,prevcriticalpoint[point]]]
]
TSGraininess[TS_, point_] := Sigma[TS,point] - point
DeltaDerivativenormal[TS_, f_, x_,point_] :=Module[{criticalpoints, isolatedpoints,RDLSpoints, LDRSpoints,intervals},If[QTimeScale[TS] === True, If[checkelement[TS, point] == 1,criticalpoints = Sort[Flatten[TS]];isolatedpoints = Sort[TS[[3]]];
RDLSpoints = Sort[TS[[1]]];LDRSpoints = Sort[TS[[2]]];intervals =Transpose[{Table[Sort[TS[[i]]],{i, 2}][[1]],Table[Sort[TS[[i]]], {i, 2}][[2]]}];
checkdensepointforoneinterval[interval_, testpoint_] :=If[interval[[1]] < testpoint <interval[[2]], 1, 0];
checkdensepointforTS[testpoint_] :=Function[checkdensepointforoneinterval[#,testpoint]] /@intervals.Function[checkdensepointforoneinterval[#,testpoint]] /@ intervals;
onpoint[point1_, point2_] := If[point1 == point2, 1, 0];checkRDLSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@RDLSpoints.Function[onpoint[testpoint, #]] /@ RDLSpoints;
checkLDRSpointforTS[testpoint_] :=Function[onpoint[testpoint, #]] /@LDRSpoints.Function[onpoint[testpoint, #]] /@ LDRSpoints;
checkisolatedpointforTS[testpoint_]:=Function[onpoint[testpoint, #]] /@isolatedpoints.Function[onpoint[testpoint, #]] /@isolatedpoints;
nextcriticalpoint[testpoint_] :=criticalpoints[[First[First[Position[criticalpoints, testpoint]]]+ 1]];
If[Last[criticalpoints] == point,Print[point," is not an element of\!\(\*SuperscriptBox[\"T\", \
\"\[Kappa]\"]\)"],Which[checkdensepointforTS[point]== 1,Limit[(f - (f /. x -> point))/(x - point), x -> point],checkRDLSpointforTS[point] == 1,If[Limit[f, x -> point, Direction-> -1] != f /. x -> point,Print["Delta derivative at thepoint ", point," doesn’t exist."],
46
Limit[(f - (f /. x -> point))/(x - point), x -> point,Direction -> -1]],checkLDRSpointforTS[point] == 1,
If[Limit[f, x -> point, Direction-> 1] != f /. x -> point,Print["Delta derivative at thepoint ", point," doesn’t exist."], ((f /. x ->Sigma[TS, point]) - (f /.
x -> point))/(Sigma[TS,point] - point)],
checkisolatedpointforTS[point] ==1, ((f /. x -> Sigma[TS, point])- (f /. x -> point))/(Sigma[
TS, point] - point)]],Print[point, " is not an element ofTime Scale given!"]],
Print["Given list is not enteredproperly as a time scale."]]]
DeltaDerivativesq[TS_, f_, x_, point_]:=If[(Limit[TS[[1]], TS[[2]] -> Infinity]===
point && ((Limit[TS[[1]], TS[[2]]-> Infinity]) < (TS[[1]] /.
TS[[2]] -> 1))), (D[f, x] /. x-> point),
FullSimplify[((f /. x -> Sigma[TS,point]) - (f /.
x -> point))/(Sigma[TS, point] -point)]]
DeltaDerivative[TS ,f ,x ,point ]
:=If[Length[TS] == 3,DeltaDerivativenormal[TS, f, x, point],DeltaDerivativesq[TS, f, x, point]]
DeltaIntegral[TS ,f ,x ,intrvll ]
:=Module[{SoFl, pnts, p1, p2, lastpnts,setsum, contsum, RI, RI2,Intervals, totalsum}, If[QTimeScale[TS] === True,If[checkelement[TS, intrvll[[1]]] +
checkelement[TS, intrvll[[2]]] == 2,SoFl = Sort[Flatten[TS]];pnts = Append[SoFl, intrvll[[1]]];pnts = Append[pnts, intrvll[[2]]];pnts = Union[Sort[pnts]];p1 = First[Position[pnts, intrvll[[1]]]];p2 = First[First[Position[pnts,intrvll[[2]]]]];
lastpnts = {};For[i = First[p1], i < p2, lastpnts =Append[lastpnts, pnts[[i]]];
i++];Intervals = Sort[Transpose[{TS[[1]],TS[[2]]}]];setsum = \!\(
\*UnderoverscriptBox[\(\[Sum]\),\(i = 1\), \(Length[
lastpnts]\)]\(\((f /.x -> lastpnts[\([\)\(i\)\(]\)])\)\ \((Sigma[TS,lastpnts[\([\)\(i\)\(]\)]] -lastpnts[\([\)\(i\)\(]\)])\)\)\);
RI = {};Contint[exint_] :=Which[intrvll[[1]] <= exint[[1]] <=exint[[2]] <= intrvll[[2]],Append[RI, exint],intrvll[[1]] <= exint[[1]] <=intrvll[[2]] <= exint[[2]],Append[RI, {exint[[1]],intrvll[[2]]}],exint[[1]] <= intrvll[[1]] <=exint[[2]] <= intrvll[[2]],Append[RI, {intrvll[[1]],exint[[2]]}],exint[[1]] <= intrvll[[1]] <=intrvll[[2]] <= exint[[2]],Append[RI, intrvll],intrvll[[1]] <= intrvll[[2]] <=exint[[1]] <= exint[[2]],Append[RI, {exint[[1]],exint[[1]]}],exint[[1]] <= exint[[2]] <=intrvll[[1]] <= intrvll[[2]],Append[RI, {exint[[1]],exint[[1]]}]];
RI2 = Function[First[#]] /@Function[Contint[#]] /@ Intervals;contsum = \!\(
\*UnderoverscriptBox[\(\[Sum]\),\(k = 1\), \(Length[RI2]\)]\(\*SubsuperscriptBox[\(\[Integral]\),\(\(RI2[\([\)\(k\)\(]\)]\)[\([\)\\(1\)\(]\)]\), \(\(RI2[\([\)\(k\)\(]\)]\)[\([\)\(2\)\(]\)]\)]f \\[DifferentialD]x\)\);
totalsum = setsum + contsum;totalsum,Print["One or more end points ofgiven interval is/are not \
element(s) of given Time Scale!"]]]
47
]
TSPlottek[TS_, Fnct_, x_] :=Module[{Intervals, BPoints, IntervalPlot,AllIntervalPlot,AllBPoints},Intervals = Transpose[{Sort[TS[[1]]],Sort[TS[[2]]]}];BPoints = Flatten[TS];IntervalPlot[g_, t_, {min_, max_}] :=Plot[g, {t, min, max}];AllIntervalPlot = Function[IntervalPlot[Fnct, x, #]] /@ Intervals;BPointsPlot[g_, t_, iso_] :=Graphics[{{AbsolutePointSize[5],Point[{iso, g /. t -> iso}]}}];AllBPoints = Function[BPointsPlot[Fnct, x, #]] /@ BPoints;Show[AllIntervalPlot, AllBPoints,PlotRange -> All,AspectRatio -> Automatic, Axes ->True, AxesOrigin -> {0, 0}]]
TSPlotcok[TS_, Fnct_, x_] :=Show[Function[TSPlottek[TS, #, x]] /@Fnct]
TSPlot[TS ,Fnct ,x ]
:= If[Head[Fnct] === List, TSPlotcok[TS,Fnct, x],TSPlottek[TS, Fnct, x]]
TSPlot1[TS_, Fnct_, x_] :=Module[{Intervals, BPoints, IntervalPlot,AllIntervalPlot,AllBPoints},Intervals = Transpose[{Sort[TS[[1]]],Sort[TS[[2]]]}];BPoints = Flatten[TS];IntervalPlot[g_, t_, {min_, max_}] :=Plot[g, {t, min, max}, PlotStyle ->{Blue, Thickness[0.01]}];AllIntervalPlot = Function[IntervalPlot[Fnct, x, #]] /@Intervals;BPointsPlot[g_, t_, iso_] :=Graphics[{{AbsolutePointSize[5], Blue,
Point[{iso, g /. t -> iso}]}}];AllBPoints = Function[BPointsPlot[Fnct,x, #]] /@ BPoints;Show[AllIntervalPlot, AllBPoints,PlotRange -> All,Axes -> {True, False}]
]; DrawTimeScale[TS_] := TSPlot1[TS, 0, x]
TSTangentLine[TS ,f ,x ,pnt ]
:= Module[{m, n, aa, aaa, aaaa},m = DeltaDerivative[TS, f, x, pnt];n = -m pnt + f /. x -> pnt;aa = Plot[m x + n, {x, Min[Flatten[TS]], Max[Flatten[TS]]},PlotStyle -> Red];
aaa = TSPlot[TS, f, x];aaaa =Graphics[{{AbsolutePointSize[5], Red,
Point[{pnt, f /. x -> pnt}]}}];Show[aa, aaa, aaaa, AspectRatio ->Automatic, PlotRange -> All,Axes -> True, AxesOrigin -> {0, 0}]]
TSAreaPlot[TS_, func_, x_, intrvll_] :=Module[{aaa, AllIntervalPlott,Intervalss, listed}, If[QTimeScale[TS] === True, If[checkelement[TS, intrvll[[1]]] +checkelement[TS, intrvll[[2]]] ==
2,flatt = Flatten[TS];Intervalss = Transpose[{TS[[1]],TS[[2]]}];
rect[p_] :=Graphics[{Orange,Rectangle[{p, 0}, {Sigma[TS, p],func /. x -> p}]}];
aaa = TSPlot[TS, func, x];listed = (rect[#1] &) /@ flatt;IntervalPlott[g_, t_, {min_, max_}]:=Plot[g, {t, min, max}, Filling ->0, FillingStyle -> Orange];AllIntervalPlott =Function[IntervalPlott[func, x, #]]/@ Intervalss;
Show[{aaa, listed, AllIntervalPlott},AspectRatio -> Automatic,PlotRange -> All, Axes -> True,AxesOrigin -> {0, 0}],
Print["At least one point given isnot element of the time scale \
given!"]], Print["Time scale given is notdefined properly!"]
]]
PlotTxT[T1_, T2_, Funct_, x_, y_] :=
48
Module[{IntT1, DPointT1, IntT2,DPointT2, Gixi, Gpxp, Gixp, Gpxi},IntT1 = Transpose[{T1[[1]], T1[[2]]}];DPointT1 = T1[[3]];IntT2 = Transpose[{T2[[1]], T2[[2]]}];DPointT2 = T2[[3]];ixi[int1_, int2_, func1_, x1_, y1_] :=Plot3D[func1, {x1, int1[[1]],int1[[2]]}, {y1, int2[[1]],
int2[[2]]}];allixi[intst1_, intst2_, func_, x2_,y2_] :=Table[ixi[intst1[[i]], intst2[[j]],func, x2, y2], {i, 1,
Length[intst1]}, {j, 1, Length[intst2]}];
pxp[point1_, point2_, funct_, x3_,y3_] :=ListPointPlot3D[{{point1, point2,
funct /. {x3 -> point1, y3 ->point2}}}];
allpxp[pointst1_, pointst2_, func_,x4_, y4_] :=Table[pxp[pointst1[[i]],pointst2[[j]], func, x4, y4], {i, 1,
Length[pointst1]}, {j, 1, Length[pointst2]}];
ixp[int_, point_, funct_, x5_, y5_] :=ParametricPlot3D[{x5, point, funct /.y5 -> point}, {x5, int[[1]],
int[[2]]}];allixp[intst1_, pointst2_, func_, x6_,y6_] :=Table[ixp[intst1[[i]], pointst2[[j]],func, x6, y6], {i, 1,
Length[intst1]}, {j, 1, Length[pointst2]}];
pxi[point_, int_, funct_, x7_, y7_] :=ParametricPlot3D[{point, y7, funct /.x7 -> point}, {y7, int[[1]],
int[[2]]}];allpxi[pointst1_, intst2_, func_, x8_,y8_] :=Table[pxi[pointst1[[i]], intst2[[j]],func, x8, y8], {i, 1,
Length[pointst1]}, {j, 1, Length[intst2]}];
Gixi = allixi[IntT1, IntT2, Funct, x,y];Gpxp = allpxp[DPointT1, DPointT2,Funct, x, y];Gixp = allixp[IntT1, DPointT2, Funct,x, y];Gpxi = allpxi[DPointT1, IntT2, Funct,
x, y];Show[{Gixi, Gpxp, Gixp, Gpxi},PlotRange -> All,AxesLabel -> {TS1, TS2}]]
DrawTimeScale3D[T1 ,T2 ]
:= PlotTxT[T1,T2, 0, x, y]
PartialDeltaDerivative[T12 ,var12 ,pfunct ,var ,p0 ]
:= Module[{pfunctt},Which[var === var12[[1]],pfunctt = pfunct /. {var12[[2]] ->p0[[2]]};
DeltaDerivative[T12[[1]], pfunctt,var, p0[[1]]],var === var12[[2]], pfunctt = pfunct/. {var12[[1]] -> p0[[1]]};DeltaDerivative[T12[[2]], pfunctt,var, p0[[2]]]]]
DeltaTangentPlane[T1 ,T2 ,TPfunct ,TPvars ,TPpoint ]
:= Module[{},denklem = ((TPfunct /. {TPvars[[1]]-> TPpoint[[1]],
TPvars[[2]] -> TPpoint[[2]]}) +(PartialDeltaDerivative[{T1,T2}, TPvars, TPfunct,
TPvars[[1]], {TPpoint[[1]],TPpoint[[2]]}]) (x -TPpoint[[1]]) + (PartialDeltaDerivative[{T1, T2},TPvars,
TPfunct, TPvars[[2]], {TPpoint[[1]], TPpoint[[2]]}])(y - TPpoint[[2]]));
tngntpln =Plot3D[denklem, {x, TPpoint[[1]] - 1,TPpoint[[1]] + 1}, {y,
TPpoint[[2]] - 1, TPpoint[[2]] + 1},ColorFunction -> "RustTones"];
yuzey = PlotTxT[T1, T2, TPfunct,TPvars[[1]], TPvars[[2]]];Show[{yuzey, tngntpln}]]
REFERENCES
[1] M. Bohner and A. Peterson, Dynamic Equations on TimeScales: An Introduction with Applications, Boston:Birkhauser, 2001.
[2] M. Bohner and A. Peterson, Advances in Dynamic Equationson Time Scales, Boston: Birkhauser, 2003.
49
[3] M. Bohner, G. Sh. Guseinov, Patrial Differentiation on TimeScales, Dynamic Systems and Applications 13, 351–379, 2004.
[4] M. Bohner, G. Sh. Guseinov, An Introduction to ComplexFunctions on Product of Two Time Scales, J. Difference Equ.Appl. 2005.
[5] S. Hilger, Analysis on measure chains-a unified approach tocontinuous and discrete calculus, Results Math. 35, 18–56,1990.
[6] U. Ufuktepe, S. Kapcak, Unification of Analysis with Mathe-matica, Proceeding of the 2009 International Conference onComputational and Mathematical Methods in Science andEngineering, V 3, 1053–1063, 2009.
[7] A. Yantir, U. Ufuktepe, Mathematica Applications on TimeScales for Calculus, Lecture Notes in Computer Science, 529–537, 3482, 2005.
50