Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [discontinuity]

Tag for issues caused by discontinuity (e.g. Boole, Piecewise, UnitStep, If, etc) in arithmetic function.

0
votes
1answer
55 views

NDSolve gives unexpected results when using the method of lines

I've been trying to solve the following PDE using the NDSolve function but it seems something is not working properly. The PDE is a the heat equation on polar coordinates and assuming angular simmetry:...
1
vote
0answers
27 views

Discontinuities in taking the roots of a complex function

I have the following functions e1, e2, and e3 which consists of the functions ...
3
votes
1answer
71 views

NDSolve with piecewise boundary conditions

I am trying to solve two simultaneous partial differential equation for $P[x,t]$ and $V[x,t]$. I have a piecewise boundary condition for $V[L,t]$. When using that piecewise condition, I get the error ...
4
votes
2answers
131 views

Heat equation with variable conductivity

Let us consider the (very simple) problem $\qquad \partial_x[k(x)\,\partial_xu]=0,\quad x\in [0,1]$ $\qquad u(0)=0,\ u(1)=1,$ with $l\in(0,1)$ $\qquad k(x)=\left\{\begin{array}{l}k_1^{},x<l\\k_2^...
5
votes
0answers
46 views

Evaluation of Mod of InterpolatingFunction prevents discontinuity processing by Plot

While trying out @MichaelSeifert's answer to Eliminating Discontinuities When Using Mod with NDSolve and Plot for Oscillators, I came across this odd behavior. Depending on how an ...
2
votes
1answer
55 views

Eliminating Discontinuities When Using Mod with NDSolve and Plot for Oscillators

I have found similar questions to mine, but dealing with piecewise and parametric plots instead and unfortunately the answers don't seem to extend to my case. I have a solution from ...
0
votes
1answer
58 views

ContourPlot showing breaks in contours

I'm trying find graphically the solutions of the intersection of the following functions. ...
0
votes
1answer
55 views

Finding the discontinuities of a function

I have a list of data and I want to find the discontinuities in the plot of them but I don't want to use interpolation because it is not that exact that it should be. is there any other way? The ...
0
votes
1answer
59 views

Defining a function with a point of finite discontinuity [closed]

I wrote the code for the function $T$ defined on $[0,1]$ by $T(x)=\frac{x+2}{3}$ if $x\neq\frac{1}{2}$ and $T(\frac{1}{2})=1$ as follows. ...
0
votes
2answers
62 views

How to plot 3D discontinuous iterative plot?

I am having troubles with plotting this set of data triples={{0, 1, 1}, {9/50, 4/5, 1}}, {{9/50, 4/5, 1}, {3/8, 4/5, 1}}, {{3/8, 58333/100000, 1}, {3/4, 16667/100000, 1}}, {{3/4, 0, 1}, {1, 0, ...
0
votes
0answers
45 views

How to get rid of the discontinuities in the plots and animation?

Trying to plot the angles for a double pendulum against each other such that they stay within the bounds of -Pi to Pi. The NDSolve solves the equations such that if a pendulum does a full loop the ...
6
votes
2answers
96 views

Finding a removable singularity

I have more complex functions than this, but say I just have: f[x_]:=(x-a)/(x-2) The function is not defined for x==2. I ...
1
vote
2answers
87 views

Solving an ODE with a sign/step function which depends on the time derivative

I'm trying to solve a set of ODEs with a Heaviside step function which depends on the sign of the derivative of the function. This is a simplifying example of what I'm trying to do ...
3
votes
2answers
94 views

Using NDSolve with conditional expression

I am trying to solve the 2nd order ODE for a harmonic oscillator under the influence of a harmonic restoring force, a sliding friction force, and a static friction force. My equations are below: $$ x'...
3
votes
1answer
75 views

WhenEvent - energy conservation not valid [closed]

I would like to simulate the following conservative system, with purely elastic impacts (coefficient of restitution is 1). Applying the WhenEvents the energy of the system is not conserved. How can I ...
6
votes
1answer
257 views

The rectangular region composed of two triangular regions contains a pde connecting the bc of the first and the second kind

I'm going to solve the Laplacian equation of the electrostatic field, which consists of two triangular regions, a rectangular region, a square, and on the intersection of the two regions of $$y=x$$, ...
2
votes
1answer
33 views

Summations with power of DiscreteDelta

Expression Sum[DiscreteDelta[a - 1]^2, {a, -∞, ∞}] evaluates to 1, as expected, but Sum[DiscreteDelta[a - b]^2, {a, -∞, ∞}] does not converge, according to ...
2
votes
0answers
43 views

How to express continuity assumption for Integrate?

I am wondering if it is possible, and how if so, to express function continuity in the assumptions for the definite form of Integrate. First of all, while ...
4
votes
2answers
239 views

Problem in sharpness of Heaviside Function

The Heaviside function is not sharp, Do not know why? ...
1
vote
0answers
63 views

Saturation function in Mathematica [duplicate]

In Simulink, there is a function called Saturation: Is there function like that in Mathematica? If yes, what is it called?
0
votes
1answer
113 views

Piecewise continuation of a discrete function on an area

I have a discrete function (finite set of values) defined on an area $\Omega$ in $R^2$. Each value of the function is defined on a subarea $\Omega_i$(triangle in my case). These triangles account for ...
2
votes
1answer
188 views
1
vote
0answers
152 views

NDSolve unable to handle discontinuities

I'm trying to solve a set of ordinary non-linear differential equations but running into issues. Specifically, after supplying Mathematica the below definitions and evaluating the ...
1
vote
2answers
135 views
4
votes
1answer
182 views

Options of WhenEvent

I'm using NDSolve and WhenEvent to simulate building heating systems and their discontinuous operation. Here is a simplified example. The idea is quite simple. I have the following WhenEvents: <...
2
votes
1answer
240 views

Force derivative of piecewise function at boundary points to be one-sided derivative

I've defined a smooth step function given as f[x_] = Piecewise[{ {y0, x<x0-dx/2}, {y0+1/2(y1-y0)(1-Cos[Pi*x/dx]), x<x0+dx/2}, {y0, True} }]; ...
6
votes
2answers
510 views

Solving wave equation with singular initial conditions

I am trying to compute the solution to the wave equation using NDSolveValue and singular initial displacement (continuous, but not differentiable in a point). I ...
3
votes
0answers
93 views

NDSolve produces different solutions for the same set of equations [duplicate]

I've tried to simulate simple mechanical system - mass which is pulled on a spring. The code You can find below. Unfortunately, I can't get correct results. But, what has surprised me more, is that ...
1
vote
1answer
691 views

A discontinuity in a plot of a continuous function

I plot a continuous, though not a smooth function: Plot[If[a >= 0.5, 0, Sqrt[0.5 - a]], {a, -1, 1}, PlotRange -> All] which returns the following One can ...
2
votes
1answer
156 views

Piecewise causes ndnum warning in NDSolve

Bug introduced in 8.0.4 or earlier. I try to solve the heat transfer equation with boundary condition that depends on time: ...
7
votes
1answer
567 views

Free Convective Heat Transfer of Non-Newtonian Power Law Fluids from a Vertical Plate

I am trying to solve a set of PDEs mentioned in this paper with NDSolve but facing quite a few issues. The PDE system is: ...
7
votes
2answers
273 views

NDSolve with Piecewise solving BVP gives warning bvdisc [duplicate]

Backslide introduced in 9.0, persisting through 11.0.1 I try to solve a boundary value problem of coupled ODEs. For reference, when I solve this set of equations it works without any problems: ...
9
votes
3answers
636 views

Position of discontinuous coefficient influences the solution of PDE

This issue is raised in the discussion under this post about heat flux continuity and I think it's better to start a new question to state it in a clearer way. Just consider the following example: <...
5
votes
3answers
290 views

How to complete function which is not defined for all interval

I have a function testF22 like this ...
5
votes
1answer
199 views

Discontinuous boundary condition distorts in the numeric solution

Here I want to simulate a physical model that I have used a set of differential equations. My coefficients and parameters: ...
11
votes
1answer
1k views

NDSolveValue - Heat flux continuity

I'm having some problems with NDSolve and the problem of conduction of heat. Specifically I'm having problems with the continuity of heat flux. First, let me ...
4
votes
2answers
379 views

Can't use my own discontinuous coefficient within NDSolve

I want to evaluate the pendulum's motion with changing equilibrium state given by eqilValue[t]: ...
7
votes
1answer
3k views

NDSolve and Piecewise functions [duplicate]

Backslide introduced in 9.0, persisting through 11.0.1 I want to clarify upfront, This is not a please help me get the answer to my homework question. I know what I need to do I just do not know how ...
10
votes
3answers
2k views

Can NDSolve handle discontinuous data?

Backslide introduced in 9.0, persisting through 11.0.1 It is possible to numerically solve a differential equation if not-smooth data are involved? For example the following instruction return the ...
32
votes
3answers
4k views

Plot a piecewise function with black and white disks marking discontinuities

Let's say I'd like to plot Sign[x + 0.5]: Plot[Sign[x + 0.5], {x, -1, 1}] Mathematica will give this: This plot does not ...
5
votes
4answers
2k views

NDSolve with Piecewise gives the incorrect answer randomly

Bug introduced in 9.0 and fixed in 11.1 NDSolve in Mathematica 9.0.0 (MacOS) is behaving strangely with a piecewise right hand side. The following code (a ...