You are on page 1of 6

Available

Available online
online at
at www.sciencedirect.com
www.sciencedirect.com
Available
Availableonline
onlineatatwww.sciencedirect.com
www.sciencedirect.com

ScienceDirect
ScienceDirect 
Procedia
Procedia Manufacturing
Manufacturing 00 (2018) 000–000
Procedia Manufacturing 32 00 (2018)
(2019) 000–000
634–639
Procedia Manufacturing 00 (2017) 000–000 www.elsevier.com/locate/procedia
www.elsevier.com/locate/procedia
www.elsevier.com/locate/procedia

The
The 12th
12th International
International Conference
Conference Interdisciplinarity
Interdisciplinarity in
in Engineering
Engineering
An Implementation Attempt for Solving Cauchy Problem with a
Sequential
Manufacturing Engineering Society Approach
International Conference 2017, MESIC 2017, 28-30 June
2017, Vigo (Pontevedra),
aa Spain
aa
Marcel
Marcel Bogdan
Bogdan ,, Ioan
Ioan Ispas
Ispas
Costing models for capacity optimization inMureş,
Industry 4.0: Trade-off
Maior” aa ”Petru
Maior” University,
University, N.
N. Iorga
Iorga street,
street, No.
”Petru No. 1,
1, Tı̂rgu
Tı̂rgu Mureş, Romania
Romania

between used capacity and operational efficiency


Abstract
Abstract
We
We continue
continue the
the investigation
A. Santana
investigation started
started in
in [1]
a
, P.weAfonso
[1] where
where we solved
a,*
, A.Cauchy
solved aa linear
Zanin
linear Cauchy
b
, R. with
problem Wernke
problem with
b
discontinuous
discontinuous perturbation
perturbation two
two ways,
ways,
by solving continuous Cauchy problems successively
by solving continuous Cauchy problems asuccessively and
and by
by using
using Laplace
Laplace transform.
transform. Thus,
Thus, an
an implementation
implementation of
of this
this approach
approach
University of Minho, 4800-058 Guimarães, Portugal
to
to aa computer
computer algebra
algebra system
system isis initiated.
initiated. b Unochapecó, 89809-000 Chapecó, SC, Brazil
©
cc 2019
2018 The Authors. Published by Elsevier Ltd.

 2018 The
The Authors.
Authors. Published
Published by
by Elsevier
Elsevier Ltd.
Ltd.
This is
This is an
an open
open access
access article
article under
under the
the CC BY-NC-ND
BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
(https://creativecommons.org/licenses/by-nc-nd/4.0/)
This is an open access article under the CC
CC BY-NC-ND license
license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Selection and
Selection and peer-review
peer-review under
under responsibility
responsibility of
of the
the 12th
12th International
International Conference
ConferenceInterdisciplinarity
Interdisciplinarityin
inEngineering.
Engineering.
Abstract
Selection and peer-review under responsibility of the 12th International Conference Interdisciplinarity in Engineering.
Keywords: Cauchy problem; Laplace transform; harmonic oscillator; Python.
Keywords:
Under the Cauchy
concept problem; Laplace transform; harmonic oscillator; Python.
of "Industry 4.0", production processes will be pushed to be increasingly interconnected,
information based on a real time basis and, necessarily, much more efficient. In this context, capacity optimization
goes beyond the traditional aim of capacity maximization, contributing also for organization’s profitability and value.
Indeed, lean management and continuous improvement approaches suggest capacity optimization instead of
1.
1. Typical
Typical Cauchy
maximization. Cauchy The study problem
problemof capacity optimization and costing models is an important research topic that deserves
contributions from both the practical and theoretical perspectives. This paper presents and discusses a mathematical
In
In our
model forprevious
our capacitywork
previous [1]
[1] we
management
work we exemplified how
how the
based on different
exemplified the Laplace
costing transform
Laplace models (ABC
transform can
can be introduced
and
be TDABC).instead
introduced of
of being
A generic
instead model
being defined first
has been
defined first
of all [2,
developed 3,
of all [2, 3,and4,
4, 5,5, 7,
it 7,
was 8, 9].
8, used
9]. to analyze idle capacity and to design strategies towards the maximization of organization’s
Let
value. ff be
Let The aa given
given (not
betrade-off necessarily
capacity
(not continuous)
maximization
necessarily function
function and
vs operational
continuous) and the
the linear
efficiency ordinary
ordinary differential
is highlighted
linear and it is equation
differential shown that
equation yy − yy =
= f,
−capacity f,
xx
with y (x)
optimization =
with y00 (x) = mightC · e
C · e ,hide , C ∈ R the
C ∈operational general
R the general solution
solution of the homogeneous equation. To find the particular solution of the
inefficiency. of the homogeneous equation. To find the particular solution of the
x  x
nonhomogeneous
nonhomogeneous
©  x equation
2017 The Authors. PublishedLagrange’s
equation by Elseviermethod
Lagrange’s B.V. is
method is supposed
 x to
supposed consider yyppx(x)
to consider (x) == C(x)
C(x) ·· ee x ,, therefore
therefore C C  (x)
(x) ·· ee x =
= ff (x),
(x),
x −s x x −s x x−s
thus C(x)
thus C(x) =
Peer-review =under0
e
e −s ·
· f
f (s)
responsibility
(s) ds.
ds. One
of
One can
the
can find
find y
scientific
y p (x)
(x) =
= e
committee
e x ·
· of e
the
e −s ·
· f
f (s)
(s) ds
Manufacturing
ds =
= e
e x−s ·
· f
Engineering
f (s)
(s) ds,
Society
ds, that
that is y exp
International
is y p =
= exp ∗ f (up
Conference
∗ f (up to
to aa
0 p 00 00 p
2017.
constant; yy pp =
constant; = yy00 ∗∗ ff can can be
be taken
taken asas well).
well). The
The general
general solution
solution of of the
the given
given equation
equation is is yy = = yy00 + exp ∗∗ f.
+ exp f.
Let us
Let us consider
consider the the following
following typical
typical Cauchy
Cauchy problem
problem
Keywords: Cost Models; ABC; TDABC; Capacity Management; Idle Capacity; Operational Efficiency




yy (x)
1. Introduction (C)


 − y(x)
(x) − = ff (x)
y(x) = (x)
(C) 

y(0)
 = 1.
 y(0) = 1.
The cost of idle capacity is a fundamental information for companies and their management of extreme importance
in∗ modern production systems. In general, it is defined as unused capacity or production potential and can be measured
∗ Corresponding
Corresponding author. Tel.: +40-265-233-112.
in several ways:author.
tonsTel.:
of +40-265-233-112.
production, available hours of manufacturing, etc. The management of the idle capacity
E-mail address: marcel.bogdan@science.upm.ro
E-mail address: marcel.bogdan@science.upm.ro
* Paulo Afonso. Tel.: +351 253 510 761; fax: +351 253 604 741
E-mail address: psafonso@dps.uminho.pt

2351-9789
2351-9789 ©c 2017 The Authors. Published by Elsevier B.V.
2351-9789  c 2018
2018 The
The Authors.
Authors. Published
Published by
by Elsevier
Elsevier Ltd.
Ltd.
Peer-review
2351-9789
This under
© 2019responsibility
The Authors.of the scientific
Published bycommittee
Elsevier of the Manufacturing Engineering Society International Conference 2017.
Ltd.
This is an open access article under the CC BY-NC-ND license
is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
(https://creativecommons.org/licenses/by-nc-nd/4.0/)
This is
Selectionan open
and access
peer-review article
under under the CC
responsibility of BY-NC-ND
the 12th license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
International Conference Interdisciplinarity in
Selection and peer-review under responsibility of the 12th International
Selection and peer-review under responsibility of the 12th International Conference Interdisciplinarity
Conference in Engineering.
Engineering.
Interdisciplinarity in Engineering.
10.1016/j.promfg.2019.02.263
Marcel Bogdan et al. / Procedia Manufacturing 32 (2019) 634–639 635
2 Marcel Bogdan et al. / Procedia Manufacturing 00 (2018) 000–000


1, x ∈ [0, 1) = I

To illustrate our interest in using solutions of successive problems we first take f (x) =   The
0, x ∈ [1, +∞) = J.
solution is given by y = y0 + y0 ∗ f,1 and can be found several ways: by Lagrange’s method, or by using Laplace

yI (x), x ∈ I

transform, or by solving successively Cauchy problems, i.e. y(x) =   where yI is the solution of
y J (x), x ∈ J,
 

y (x) − y(x) = f (x), x ∈ I
 
y (x) − y(x) = f (x), x ∈ J

(C I ) 
 and y J is the solution of (C J ) 

y(0) = 1, y(1) = yI (1−).
Our goal is to find a solution utilising Python ([13]) for a scale function by the last mentioned approach. For this
purpose the programme code is given, an output is obtained after the code is run.

The Python script required for (C I ) is:

from sympy import ∗


init printing(use unicode=True)
y = Function( y )
x = S ymbol( x )
sol = dsolve(y(x).di f f (x) − y(x) − 1, y(x)).rhs
initial = solve([sol.subs(x, 0) − 1]) #implicitly solves equation sol.subs(x, 0) − 1 = 0
sol1 = sol.subs(initial)
sol1, limit(sol1, x, 1) (1)

and returns Out : (2 · e x − 1, −1 + 2e).

By description of (1), we have the following. After the first two declarative lines that import the library of symbolic
calculus in Python, the third and the fourth ones declare the type of variables y and x, in our case y = y(x). In line 5 sol
contains the general solution of the differential equation y − y = 1, that is C · e x − 1, with C ∈ R. Implementing initial
condition y(0) = 1 we get the value of the constant C from the implicit equation C · e0 − 1 − 1 = 0, that is C = 2 kept
in initial. Therefore, the solution of (C I ) is given by substituting the constant C, being returned by sol.subst(initial).
By writing sol1 we get 2 · e x − 1. The value yI (1−) = lim x1 yI (x) = lim x1 (2 · e x − 1) = 2 · e − 1 is returned after the
function call limit(sol1, x, 1) is evaluated.

Then, on the interval J the sequence of commands is:

sol = dsolve(y(x).di f f (x) − y(x), y(x)).rhs


initial2 = solve([sol.subs(x, 1) − limit(sol1, x, 1)])
sol2 = sol.subs(initial2)
sol2

x

2 · e x − 1,
 x<1
and returns Out : ee (−1 + 2e), that is (2 − e−1 ) · e x . Therefore, one obtains y(x) = 

(2 − e−1 ) · e x , x > 1.

2. Some illustrative examples

Similarly, we proceed for the harmonic oscillator perturbed by a scale function ([1]).

1 for the operational calculus one can consult [6, 10])


636 Marcel Bogdan et al. / Procedia Manufacturing 32 (2019) 634–639
Marcel Bogdan et al. / Procedia Manufacturing 00 (2018) 000–000 3


1,
 x ∈ [0, 2π/ω) = I1
Example 2.1. Let ω > 0, f (x) = 
 and the following Cauchy problem
0, x ∈ [2π/ω, +∞) = I2 ,




 y (x) + ω2 y(x) = f (x)



(Cω ) 
y(0) = 0



y (0) = 1.




 y + ω2 y = 1



The problem on I1 is (C I1 ) 
y(0) = 0 and has solution yI1 (x) = ω12 · (1 − cos ωx) + ω1 · sin ωx. On I2 it becomes



y (0) = 1,



 y + ω2 y = 0



(C I2 ) 
y(2π/ω) = yI1 (2π/ω−) = 0 and has solution yI2 (x) = ω1 · sin ωx. Then, the generalized solution of (Cω ) is



y (2π/ω) = y (2π/ω−) = 1,
I1



yI1 (x),
 x ∈ I1
y(x) = 
 (2)
yI2 (x), x ∈ I2 .

Applying Laplace transform to the equation in (Cω ), solving the algebraic equation, then by the inverse Laplace
one obtains the original Laplace


1 1 
0,
 x ∈ I1
y(x) = 2 · (1 − cos ωx) + · sin ωx + 
 (3)
ω ω − 12 · (1 − cos ωx), x ∈ I2 .
ω

The solution given in (3) is a.e. with the one from (2).

The commands required on I1 are:

from sympy import ∗


init printing(use unicode=True)
y = Function( y )
x, omega = symbols( x, omega )
sol = dsolve(y(x).di f f (x, 2) + omega ∗ ∗2 ∗ y(x) − 1, y(x)).rhs
init point = 0; init pos = 0; init velocity = 1
ec1 = Eq(sol.subs(x, init point) − init pos, 0)
ec2 = Eq(sol.di f f (x).subs(x, init point) − init velocity, 0)
coe f = linsolve([ec1, ec2], (C1, C2))
(c1, c2) = next(iter(coe f ))
solutionI1 = sol.subs({C1 : c1, C2 : c2})
ieiωx ie−iωx 1 1 1
and returns Out : 2ω2
(−ω + i) + 2ω2
(ω + i) + ω2
, that is ω2
· (1 − cos ωx) + ω · sin ωx.
Marcel Bogdan et al. / Procedia Manufacturing 32 (2019) 634–639 637
4 Marcel Bogdan et al. / Procedia Manufacturing 00 (2018) 000–000

The commands required on I2 are:

sol2 = dsolve(y(x).di f f (x, 2) + omega ∗ ∗2 ∗ y(x), y(x)).rhs


init point = 2 ∗ pi/ω
init pos = limit(solutionI1, x, init point)
init velocity = limit(solutionI1.di f f (x), x, init point)
ec1 = Eq(sol2.subs(x, init point) − init pos, 0)
ec2 = Eq(sol2.di f f (x).subs(x, init point) − init velocity, 0)
coe f = linsolve([ec1, ec2], (C1, C2)); (c1, c2) = next(iter(coe f ))
solutionI2.subs({C1 : c1, C2 : c2})
solutionI2

iωx
and returns − ie2ω + i −iωx
2ω e , that is 1
ω · sin ωx.

In general, let I ⊆ R be a nonempty interval, x0 ∈ I, and (Ik )∞ k=0 a partition of I, Ik = [xk , xk+1 ). Let n ∈ N \ {0},

ak ∈ R, k ∈ {0, 1, 2, ..., n}, L = nk=0 ak · Dk be a linear operator, and y0 j , j ∈ {0, ..., n − 1} be given. Let f be a function
that satisfies the conditions for a Laplace original, i.e. f (x) = 0, ∀x < 0; on any interval [0, N], f is continuous or has
at most finitely number of discontinuity points (it is piecewise continuous); there  exists M > 0 and σ ∈ R such that

L(y) = f

| f (x)| ≤ M · eσx , ∀x > N (see [7, 8]). A solution of the Cauchy problem (C)   can
y( j) (x0 ) = y0 j , j ∈ {0, ..., n − 1}


L(y) = f |I0

be obtained by solving successively Cauchy problems (C I0 )   and for k ∈ {1, 2, ...}
y( j) (x0 ) = y0 j , j ∈ {0, ..., n − 1}


L(y) = f |Ik

(C Ik )  or alternatively by using the Laplace transform. In the following we
y( j) (x ) = y( j) (x −), j ∈ {0, ..., n − 1},
k k
Ik−1
exemplify ones more.

Example 2.2. Let Ik = [k, k + 1[, k ∈ {0, 1, 2}. Let us consider in (C) the function

f (x) = k, x ∈ ∪2k=0 Ik .

Solving Cauchy problem on I0 = [0, 1[ we get the classic solution y0 (x) = e x . We go on to solve the problem on Ik ,
successively for k ∈ {1, 2}



y − y = f (x)

(C Ik ) 

y(k) = yIk−1 (k−),

k
finding the classic solution yIk (x) = i=0 e−k+i · e x − k. Then, the generalized solution of (C) is

y(x) = yIk (x), x ∈ ∪2k=0 Ik . (4)


638 Marcel Bogdan et al. / Procedia Manufacturing 32 (2019) 634–639
Marcel Bogdan et al. / Procedia Manufacturing 00 (2018) 000–000 5

The sequence of commands is:


from sympy import ∗
init printing(use unicode=True)
y = Function( y )
x = S ymbol( x )
ends interval = [0, 1, 2] #the ends of the intervals
f ree = [0, 1, 2] #the values of the free term
sol1 = 1
for i in range (0, 3) :
sol = dsolve(y(x).di f f (x) − y(x) − f ree[i], y(x)).rhs
initial = solve([sol.subs(x, ends interval[i]) − limit(sol1, x, ends interval[i])])
sol1 = sol.subs(initial)
print(sol, initial, sol1)
and returns
C ∗ exp(x) {C1 : 1} exp x
C ∗ exp(x) − 1 {C1 : (1 + E) ∗ exp(−1)} (1 + E) exp(−1) ∗ exp x − 1
C ∗ exp(x) − 2 {C1 : (1 + E + exp(2)) ∗ exp(−2)} (1 + E + exp(2)) exp(−2) ∗ exp x − 2,



 ex, x ∈ I0



that is y(x) =  −1 x
 (1 + e) · e · e − 1, x ∈ I1 that coincides a.e. with (4).



(1 + e + e2 ) · e−2 · e x − 2, x ∈ I2 ,

A next step forward is reading the number of intervals and the values of the function. The commands required are:
from sympy import ∗
init printing(use unicode=True)
y = Function( y ); x = S ymbol( x )
f 0 = f loat(input(”the value of function f on I 0 : ”))
init point = 0; initial0 = 1
sol = dsolve(y(x).di f f (x) − y(x) − f 0, y(x)).rhs
initial = solve([sol.subs(x, init point) − initial0])
sol1 = sol.subs(initial) #solution on I0
print(sol1)
n = int(input(”Number of intervals:”))
ends interval = list(range(0, n)) #the left-ends of the intervals, xk ; k ∈ {1, ..., n}
f ree = list(range(0, n)) #the values of the free term
for k in range (1, n) :
ends interval[k] = f loat(input(”the left-end of I ” + str(k) + ”=[x ” + str(k) + ”, x ” + str(k + 1) + ”):”))
f ree[k] = f loat(input(”the value function f at x ” + str(k) + ” : ”))
sol = dsolve(y(x).di f f (x) − y(x) − f ree[k], y(x)).rhs
initial = solve([sol.subs(x, ends interval[k]) − limit(sol1, x, ends interval[k])])
sol1 = sol.subs(initial)
print(sol1)
Marcel Bogdan et al. / Procedia Manufacturing 32 (2019) 634–639 639
6 Marcel Bogdan et al. / Procedia Manufacturing 00 (2018) 000–000

so, after the input of value of the function f on I0 , x0 = 0 being declared as init point, the input of n, number
of intervals along [x0 , x1 ), and the values of the function f at x1 , ..., xn−1 are given/read, the output would be sol1,
therefore the solution of the Cauchy problem is the collect of all, y(x) = yIk (x), x ∈ ∪nk=0 Ik .

2.1. Conclusions

A Cauchy problem governed by a linear nonhomogeneous differential equation, where the free term is a scale
function with a finite number of discontinuity points, was solved. The Python script uses sympy library. Mainly, dsolve
function is called for symbolic solving of differential equations. Function solve is called for the algebraic equation so
that the constant to be determined from the Cauchy condition. Function limit is called to find the value of the solution
on the given interval, to be transferred to the next one (except the last interval). After the script is running, the output
is almost everywhere (a.e.) with the analytic solution. Similar approach may be used with symbolic calculus library
from Matlab [11] and Octave [12]. A code for WolframAlpha [14] should be welcome.

References

[1] M. Bogdan, An exemplified introduction of the Laplace transform, Scientiffic Bulletin of the ”Petru Maior” University, 15, (2018) 25-28.
[2] V. Brânzănescu, O. Stănăşilă, Matematici speciale, Editura All, Bucureşti (in Romanian), 1998.
[3] V. Cârtoaje, Teoria Sistemelor Automate, Editura Universităţii de Petrol-Gaze din Ploieşti, Ploieşti (in Romanian), 2013.
[4] A. Corduneanu, Ecuaţii Diferenţiale cu Aplicaţii ı̂n Electrotehnică, Editura Facla, Timişoara (in Romanian), 1981.
[5] K.-H. Grote, E.K. Antonsson, Springer Handbook of Mechanical Engineering, vol. 10, Springer, 2009.
[6] A. Haimovici, Ecuaţii diferenţiale şi ecuaţii integrale, Editura Didactică şi Pedagogică, Bucureşti (in Romanian), 1965.
[7] Gh. Micula, P. Pavel, Ecuaţii diferenţiale şi integrale prin probleme şi exerciţii, Editura Dacia, Cluj-Napoca (in Romanian), 1989.
[8] G. Pavel, F.I. Tomuţa, I. Gavrea, Matematici speciale, Editura Dacia, Cluj-Napoca (in Romanian), 1981.
[9] R. Redheffer, Differential Equations: Theory and Applications, Boston, 1991.
[10] Ct. Tudosie, Probleme de ecuaţii diferenţiale, Editura Dacia, Cluj-Napoca (in Romanian), 1990.
[11] Matlab, http://www.mathworks.com/help/optim/ug/linprog.html
[12] Octave, http://octave-online.net/
[13] Python, https://www.python.org/
[14] WolframAlpha, https://www.wolframalpha.com/

You might also like