# Questions tagged [discontinuity]

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

47 questions
Filter by
Sorted by
Tagged with
160 views

### A discontinuity in an integral

I have a function which I'm trying to integrate, which is perfectly smooth and Mathematica sees it as well defined everywhere in the region over which I'm integrating it. The function is: ...
100 views

### Problem with using NDSolve on wave PDE on string

I am trying to verify my hand solution for wave PDE in 1D, on a string. The solution I get from NDSolve does not match the analytical solution. This is a string, ...
67 views

### Piecewise function not evaluating in NDSolve

Perhaps it's something obvious, but why does this simple piecewise function (as well as other conditionals) not evaluate in NDSolve: ...
169 views

### Ndsolve problem with Sign (friction)

In a very simple model I consider the motion of a body with frictional force. ...
541 views

### How to set interface conditions for optical waveguide in NDEigensystem?

I have been working on waveguide mode analysis using FEM in Mathematica for a week, but I haven't succeeded until now. The optical fiber-like waveguide is featured with different refractive index in ...
79 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:...
30 views

### Discontinuities in taking the roots of a complex function

I have the following functions e1, e2, and e3 which consists of the functions ...
108 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 ...
171 views

217 views

### NDSolve cannot do a discontinuity replacement for event surfaces that depend only on time

I'm trying to solve a system of DAEs with discrete conditions: ...
167 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 ...
150 views

### NFourierTransform gives wrong result

This is my code: ...
207 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: <...
273 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} }]; ...
540 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 ...
103 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 ...
864 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 ...
168 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: ...
595 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: ...
281 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: ...
667 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: <...
293 views

### How to complete function which is not defined for all interval

I have a function testF22 like this ...
189 views

The code ...
205 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: ...
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 ...
388 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]: ...
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 ...
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 ...