Questions tagged [discontinuity]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
59 views

Can't extend the function to continuous [closed]

I have code: Am0[ω_] := Abs[H[I*ω]] Am[ω_] := Piecewise[{{Limit[Am0[ω], ω -> 0], ω == 0}, {Am0[ω], ω!= 0}}] Limit[Am0[ω], ω -> 0] Am[0] Function ...
3
votes
1answer
103 views

Sided Exclusions in Plot

Consider Plot[Floor[x],{x,-5.5,5.5},ExclusionsStyle->{None,Blue}] At each discontinuity, we get circles indicating the jump. Mathematically, ...
3
votes
3answers
75 views

Plotting the sign of a two-variables function

I have a continous function f(x,y), and I want the 2D plot of its sign. I then created a function sign=Sign[f] and used ...
4
votes
1answer
123 views

Problem with NDSolve and piecewise functions: Failure computing Filippov continuation

I am trying to solve a first order differential equation using NDSolve. The differential equation is ...
2
votes
1answer
202 views

Discontinuity problem with 3D cylindrical heat equation (possibly due to a conversion between Cartesian to Cylindrical coordinates)

I have been working a certain type of 3D cylindrical diffusion equation for a bit now. I am trying to simulate a longitudinal diffusion process in a cylinder with a dislocation defect that will make ...
0
votes
2answers
93 views

Unpredictable behavior of a function

The Hermitian matrix mat is used to construct a function fun[x, y, z] as follows: ...
8
votes
1answer
267 views

Ugly streaks caused by Arg in a contour plot

I had a more general question about a similar problem more than two years ago, Getting rid of discontinuities in plots caused by square roots, logarithms, `Arg`, etc, which got lots of interesting ...
3
votes
2answers
151 views

Approximate the piecewise constant with a smooth function

Let us first define a two regions as follow : inner=1;outer=2; reg1 = Disk[{0, 0}, inner]; reg2 = Annulus[{0, 0}, {inner, outer}]; glass=1.5;air=1; Now let's say I ...
2
votes
2answers
122 views

Checking for discontinuities

There was an older post about checking the continuity of a function but the routines in the reply don't seem to work for my function. Hence the new post. If I have a function ...
4
votes
3answers
328 views

Boundary value problem with a DiracDelta

It seems that Mathematica can solve an initial value problem with a DiracDelta, but not a boundary value problem with a ...
1
vote
1answer
40 views

sorting out the coordinate and respective solution values for plotting

I want to plot for coordinates and corresponding solution values below. ...
2
votes
2answers
102 views

Benefits/pitfalls of defining function that is discontinuous at a point “explicitly” vs using piecewise?

For example, suppose I wanted to define a function, f that is $f(x)=x^2$ except at $x=1$, where $f(x)=5$ Two ways I can define this are ...
0
votes
2answers
145 views
3
votes
2answers
385 views

Smooth Boxcar function (Rectangle Pulse function)

There are some answers on how to get a smooth squarewave function. But I would like to have a smooth boxcar function or rectangle function with 2 different widths.: ...
6
votes
3answers
198 views

Solving a Nonlinear Complementary Problem (plasticity)

I would like to solve the following: given $t\mapsto\sigma(t)$ and $E>0$, $\sigma_y>0$, find $\epsilon$ such that: $$\left\lbrace\begin{array}{l}g(t,\epsilon)\geq 0,\\ \phi(t,\epsilon,\epsilon')\...
12
votes
4answers
776 views

3D FEM Vector Potential

I am trying to reproduce an FEM result in a paper. Due to possible copyright I cannot show the result directly but fortunately there is a free link An Incomplete Gauge for 3D Nodal Finite Element ...
0
votes
2answers
59 views

Problem for defining continuously Eigenvectors from Kane and Mele model

The model is a simple eigenvalue problem. A matrix that depends on some parameters kx, ky, t, defined by: ...
1
vote
1answer
99 views

Continuity and derivability of a multivariable function at a specific point

I have this function: f = Sqrt(Abs(x^2 - x*y)) So, how can I prove that it is derivable and/or continue in a point, like (0,0)?
2
votes
1answer
58 views

Inconsistent behavior of Limit function when evaluating a directed limit at a discontinuity

Consider the following expression: (* In *) expr1 = Hold[Limit[Sign[x], x -> y, Direction -> "FromAbove"] == Sign[y]] Now let's substitute a ...
0
votes
0answers
45 views

Is there a functionality to analytically find discontinutites of function?

I would like know whether it is somehow possible to analytically get discontinuities of a given function on a given interval (possibly with some reasonable assumption of the function otherwise being ...
0
votes
0answers
46 views

Exiting CrossSlidingDiscontinuity in NDSolve to follow equilibrium curve

I am trying to figure out how to get the solution curve to an NDSolve to slide along once it reaches a boundary and then to exit the ...
2
votes
1answer
58 views

Why does HeavisideTheta not have an implicit piecewise expansion?

The Heaviside step function implicitly expands to a piecewise function: UnitStep[t - 3] // PiecewiseExpand $$ \begin{cases} 1 & t\geq 3 \\ 0 & \text{...
1
vote
1answer
76 views

Computing limits from the left and right and getting the same answer which isn't correct

When I use the following code: ...
8
votes
1answer
339 views

Mathematica is unable to compute the derivative of the function $\frac{\sin^2(x)}x$

Consider the function $$f: \mathbb R\to\mathbb R, x\mapsto\begin{cases}\frac{\sin^2(x)}x, & x\neq 0, \\ 0, & x=0.\end{cases}$$ It is true that $f\in\mathcal C^1(\mathbb R)$ and that $$f'(x)=\...
0
votes
0answers
54 views

Coupled nonlinear differential system with discontinuous functions which values are given by list elements, boundary conditions, NDSolve

I am very new to mathematica, I have googled my problem in vain, hope you can help me. I am currently trying to solve a non linear system of two coupled differential equations given by (41) and (42). ...
16
votes
4answers
794 views

How to model diffusion through a membrane?

This is a follow-up on How to handle discontinuity in diffusion coefficient? Consider diffusion of $u(t,x)$ on the domain $x \in [0,2]$ with some simple boundary conditions such as $u(0) = 2, u(2) = ...
9
votes
1answer
327 views

How to handle discontinuity in diffusion coefficient?

I am looking to solve the diffusion equation with a discontinuous jump in the diffusion coefficient. In 1D, the diffusion equation for $u(t,x)$ is: $$ \partial_t u = \partial_x (D \partial_x u), $$ ...
3
votes
2answers
85 views

IVP Piecewise ODE: Changing the Domain outside region of interest changes result dramatically

Good afternoon, I am attempting to solve the following ODE: ...
1
vote
1answer
34 views

Problem with Exclusions when Floor is used

...
1
vote
2answers
83 views

Plotting only one piece of an implicit 3d surface (the one value of the order parameter wich minimizes some free energy function)

I would like to plot a graphic of spontaneous magnetization vs T vs h for a Curie Weiss Model. The equation for stationary ...
6
votes
1answer
395 views

Strange result for sum $\sum _{k=1}^{\infty } \frac{\sin (k (k-1))}{k}$

In this sum over $k$ Sum[Sin[k (k - 1)]/k, {k, 1, ∞}] the result still containes the summation index $k$. ...
1
vote
1answer
388 views

Repeated convergence test failure and why?

i have assigned all the values and the ODE assigned is as this ...
1
vote
1answer
99 views

Strange results from NDSolve after using a smooth (Tanh) function to approximate a discontinuous (jump) event

I am solving a system of ODE which contains a discontinuous ode (the equation v[t]== ...in the following code and it means that my ...
3
votes
3answers
78 views

Dots at points of discontinuity

So, I got this code: Plot[Piecewise[{{3, x <= 0}, {x^2 + 1, x > 0}}], {x, -2, 2}, PlotStyle -> {Purple}, Axes -> False, Frame -> True] and I ...
0
votes
0answers
283 views

How can I get continous plot of ArcTan over all quadrants?

Scope: My calculation is an element in the optimization of a mechanism. The geometry is given by following equations. To get angles β and γ without using the inverse function ...
4
votes
3answers
708 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: ...
5
votes
1answer
151 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, ...
3
votes
1answer
97 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: ...
6
votes
2answers
261 views

Ndsolve problem with Sign (friction)

In a very simple model I consider the motion of a body with frictional force. ...
12
votes
3answers
1k 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 ...
0
votes
1answer
90 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
70 views

Discontinuities in taking the roots of a complex function

I have the following functions e1, e2, and e3 which consists of the functions ...
5
votes
1answer
246 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 ...
5
votes
2answers
351 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
89 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
104 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
68 views

ContourPlot showing breaks in contours

I'm trying find graphically the solutions of the intersection of the following functions. ...
0
votes
1answer
313 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
65 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
138 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, ...