All Questions
Tagged with calculus-and-analysis piecewise
69
questions
10
votes
2
answers
263
views
Problem with Integrate with Piecewise and PrincipalValue
Bug introduced in 8.0.4 or earlier and persisting through 11.3
In the course of developing an alternative solution for question 127301,
With,
...
6
votes
2
answers
1k
views
Derivative of piecewise function
I tried to find $f'(0)$ of this function:
$$f(x) = \begin{cases} x\cdot\sin(\frac{1}{x}) & \text{if $x\ne0$} \\ 0 & \text{if $x=0$} \end{cases}$$
This is what I tried in Mathematica:
...
6
votes
2
answers
3k
views
Derivatives of piecewise functions of functions
Background
Derivatives of piecewise functions in Mathematica are computed according to special rules. According the Piecewise documentation (see Possible Issues),
...
6
votes
3
answers
1k
views
Integrating a piecewise function with symbolic pieces
Suppose I want to compute the antiderivative of this simple function:
$$f(t)=\begin{cases}
1 & \text{if $0\le t\le t_1$,} \\
-1 & \text{if $t_1\le t\le t_2$}, \\
0 & \text{otherwise,}
\end{...
6
votes
1
answer
941
views
Using Boole to integrate over region
I have a complex and long piecewise function to integrate, so I have written a Mathematica script that cuts the whole range of integration, evaluates the integrand in each region and then integrates ...
6
votes
2
answers
658
views
Using units and piecewise functions in Integrate
For simple cases, Quantities appear to be handled well by Integrate:
...
5
votes
1
answer
1k
views
Integrate over piecewise function defined using /;
f[x_] := x /; x<0
f[x_] := x^2 /; x>=0
Integrate[f[x],{x,-1,1}]
The above does not work (Mathematica returns it unevaluated), but the
below does.
<...
5
votes
3
answers
504
views
Creating a function with integral zeroes of the 0th, 1st, and 2nd derivatives
I would like to be able to randomly generate functions, each of which satisfies
$f : [-10, 10] \rightarrow [-10, 10]$
All the zeroes, critical points, and inflection points have an integral $x$-...
5
votes
2
answers
317
views
Using Piecewise to create a periodic waveform
I want to create a piecewise function that repeats after t=T.
...
5
votes
2
answers
630
views
Integration of a piecewise function with parameters
Here is a simple piece-wise and continuous function:
f[t_,a_,b_]:=Piecewise[{{a t,t<1},{a,t<1+b},{a(2+b-t),t<2+b}}]
When I integrate ...
5
votes
1
answer
168
views
Reduce to Piecewise
There are some similar posts on SE, but none of them seems to exactly address my issue.
I need to integrate a rather complicated function (over $x>1$) separately over two domains defined as ...
4
votes
2
answers
102
views
Plot and differentiate a piecewise vector function [closed]
Consider the map $f:\mathbb R^2\to \mathbb R$ defined as
$$ f(x,y)=\begin{cases}
\|(x,y)\|^2\sin(1/\|(x,y)\|) & (x,y)\neq0 \\
0 & (x,y) =0\\
\end{cases}$$
I am trying to get a ...
4
votes
3
answers
225
views
Getting error message when integrating a simple piecewise function
I reviewed the following questions:
question 1 and question 2, but I need to the following integral of a piecewise function:
...
4
votes
3
answers
1k
views
Most efficient way to integrate a linear piecewise function
I am having a lot of trouble integrating a simple function. Here's the context: I generate data from two distributions, and I want to calculate the overlap coefficient of representing those datasets ...
4
votes
1
answer
390
views
How to convert a Piecewise function in a HeavisideTheta function?
I want to convert a Piecewise function in a HeavisideTheta function in order to correctly evaluate its derivatives at the point of abrupt change and then integrate the result along the axis. How can I ...