All Questions
Tagged with calculus-and-analysis piecewise
69
questions
0
votes
0
answers
44
views
Problem Derivative (D) of function defined with Piecewise or UnitStep functions - SIMPLE BEAM PROBLEM, 3 SUPPORTS
I am solving a simple structural beam problem using slope-deflection approach - 3 support A(left- fixed), B(middle- pin), C(right - pin). Beam AB - uniform load, Beam BC - concentrated load in ...
2
votes
1
answer
90
views
Integrate regions in Plot/Piecewise
I have the following code:
...
1
vote
2
answers
55
views
Strange behavior when integrating vector valued piecewise function
The following straightforward integral should clearly equal $\{0,0\}$ for any $R\in\mathbb R$:
...
0
votes
1
answer
39
views
Piecewise integration doesn't evaluate
I'm trying to integrate the following function:
$$q(d, \theta) = q_x(d, \theta) + q_y(d, \theta) - 2q_x(d, \theta) q_y(d, \theta)$$
where $q_x(d, \theta) = \min\left(2 - d\cos\theta, d\cos\theta\right)...
4
votes
1
answer
67
views
Confusing cases in Piecewise
The following
FullSimplify[Integrate[Exp[I ω t] Sin[ω x]/ω, {ω, 0, ∞},
Assumptions -> t > 0 && x > 0]]
gives a piecewise output of the form
I ...
3
votes
2
answers
95
views
Derivative of piecewise function returns one more case
I define the following piecewise function:
U[c_,n_,g_,p_]:=Piecewise[{{c^(1-g)/(1-g)-n^(1+p)/(1+p),g!=1}, {Log[c]-n^(1+p)/(1+p),g==1}}]
When I take the derivative
<...
1
vote
1
answer
116
views
Derivative of long expression renders Piecewise[…<<…>>…] in Jupyter notebook
My mathematical problem is to solve the optimization problem:
$$ Max_{u} \quad \mathbb{E}[\gamma S-S^2]$$
where $$S= A_0 u X+a-\max(\alpha u X+b,0)$$
with $\gamma,A_0,a,\alpha,b$ some constants and $X\...
3
votes
2
answers
96
views
How do I integrate this piecewise function with Mathematica?
I came across the question of what percent of numbers from 0 to 1 have a logerithm whose floor is even. What I did was I made a piecewise function: ...
0
votes
1
answer
354
views
How to obtain the convolution of these functions?
I am starting to use Mathematica. I wanted to compute
$$\nabla F*\phi(x),\;x\in\mathbb{R^2}$$
where $F(x)=\ln\|x\|$ and $\phi(x)=\chi_{B(0,2)}(x)$.
I am a new user of this software, so I don't know ...
4
votes
1
answer
148
views
Mathematica 12.1 integrates functions individually but not their sum
I found something odd in MMA 12.1 when symbolically integrating DiracDelta and Piecewise. These functions are integrated individually but not their sum. The following code
...
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.
...
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 ...
0
votes
1
answer
78
views
Difficult on integration the normalization of a piecewise function
I have a little problem; I have defined the following Piecewise-function in the variables {x,L,w}:
f[x_, L_, w_] := Piecewise[{{x w (L - x), 0 <= x <= L}}];
...
1
vote
1
answer
83
views
NDSolve with embedded piecewise function for state-variable
Given ODE:
$\dot{x}=-2 e^{-x^2} x + U$
where:
$U=-u_{as}$
$u_{as} = \begin{cases} \frac{e}{\psi_+-e}, & \mbox{if } e\mbox{>=0} \\ \frac{e}{e-\psi_-}, & \mbox{if } e\mbox{<0} \end{cases}$
...
1
vote
1
answer
123
views
Solving a complicated time-dependent function
I want to solve the following time-dependent system of equations:
...
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 ...
1
vote
2
answers
180
views
How to take limits in Fourier series?
I have a Fourier series which produces an impulse train of period j+1. In principle, it is given by
...
2
votes
1
answer
325
views
Limit of multivariate piecewise function
Let's say we have a multivariate piecewise function
f[x1_,x2_]:=Piecewise[{{Sin[x1]/x1,x1>x2},{Sin[x2]/x2,x1<=x2}}]
Now we want to determine the limit in f(0,...
2
votes
2
answers
162
views
Double integration with a piecewise function gives wrong result
I am attempting to solve a double integral
$$I(t) = \int_0^t dt' \int_0^{t'} dt'' f(t'')$$
of a piecewise function of the type
$$f(t) = \begin{cases}1 & \text{for } 0 \leq t < a \\ -1 & \...
0
votes
1
answer
94
views
Understand output of Integration
Could someone help me understand the output of the following Integration in Mathematica?
Specifically,
(a) what is the meaning of "True"?
(b) Why is the answer in two parts which seem to overlap ...
0
votes
1
answer
54
views
Using subscripted symbol affects integration -- why?
Below is a sample program that shows that Integrate is giving different results depending on whether I name the variable duration1 or ...
0
votes
1
answer
70
views
Why do Integrate and DSolve/DSolveValue yield such complex expressions for Piecewise functions?
This code uses two different methods for integrating a very simple piecewise function but yields surprisingly complicated integrals:
...
2
votes
1
answer
120
views
Piecewise integration not giving continuous result
I'm trying to integrate a piecewise function symbolically and I'm ending up with discontinuities which is surprising since the help mentions that constants are determined to ensure continuity.
If I ...
0
votes
0
answers
46
views
Bad Integral evaluation for Piecewise function
I have been trying to evaluate this symbolic function:
f[ρ_, R_, α_, yp0_, yp_] := R*((ρ - R*Cos[α])^2 + (R*Sin[α])^2 + (yp-yp0)^2)^(-(1/2));
Mathematica can ...
1
vote
0
answers
81
views
Speed up Integrate around Max/Min or Piecewise
Integrate around a convex combination of two functions containing Min or Max or ...
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 ...
0
votes
1
answer
63
views
Integrating a function "bit by bit"
I am trying to integrate a function. But for this task I need to do it
"bit by bit". I created a working example that shows the problem.
...
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 ...
2
votes
0
answers
64
views
Make Mathematica evaluate an integral symbolically
The following integral has a symbolic solution, which MMA does not return.
$\kappa(x) \begin{cases}
\text{mod}(x,1)\le0.5: & 1\\
\text{mod}(x,1)>0.5: & 0
\end{cases}$
$f(z)=\int_0^1 \...
1
vote
0
answers
64
views
Piecewise function inside Integrate - Wrong result
I tried to evaluate the following integral:
...