Questions tagged [piecewise]
Questions about the Piecewise function, which is represented by different expressions for different ranges of values of its independent variable.
505 questions
0
votes
0
answers
68
views
The cases of Piecewise function are not recognized when calculated in Table
Before describing the problem, a short background on how it pops up.
I am solving a PDE problem on the [0,1]x[0,1] domain. To this end, I want to find the decomposition of some derivatives of the ...
5
votes
0
answers
147
views
"Glueing" interpolating functions
Suppose we have two interpolating functions with exactly touching domains, in our case {-1, 1} and {1, 2}.
How to "glue&...
2
votes
1
answer
331
views
Issue with plotting piecewise function
I tried to plot the critical meniscus height of a liquid near a vertical rod (pulling upward) (radius, $r_0$) using the nondimensionalized equation (as $z=y/r_0$ and $r=x/r_0$) given in this paper, ...
1
vote
1
answer
136
views
Can we merge a piecewise with 2 interpolating functions into one interpolating function?
I have the following Mathematica code:
...
2
votes
1
answer
126
views
Finding the static string profile by solving three differential equation
I am trying to reproduce a static string profile of this paper, for which I use this Mathematica code:
...
2
votes
2
answers
204
views
Cannot simplify obviously simplifiable Piecewise
Simplification functions are usually able to reduce Piecewise to a simple expression when the conditions are not necessary, for example:
...
3
votes
0
answers
126
views
Handling Discontinuities in Sound Ray Tracing with Piecewise Speed of Sound in Mathematica
I'm trying to solve ray tracing equations for sound wave propagation in Mathematica 14.0. My goal is to handle a discontinuity that occurs when a sound wave crosses an interface between two media, ...
2
votes
1
answer
97
views
FindRoot for Nintegration of piecewise function
and thank you in advance. I am new to using mathematica and any comments would be greatly helpful.
I'm trying to find the root of a function ...
1
vote
1
answer
139
views
Calculating integral of a set of functions analytically
I want to calculate second integral of following functions in mathematica if possible.
$$\int_{0}^{x}\int_{0}^{y}\psi_{i}(t)dtdy=?$$
I have tried the following for the middle functions for example ...
3
votes
1
answer
203
views
Can't plot this piecewise function [duplicate]
I have a function, int1[w] which incorporates two yet-to-be evaluated constants, u a positive real and ...
3
votes
1
answer
125
views
What is the meaning of the second line of the piecewise output of SeriesCoefficient[]?
When I ask SeriesCoefficient[] to give me a general term, it outputs a response with head "Piecewise" that contains the general term in the first line and ...
0
votes
1
answer
75
views
0
votes
0
answers
24
views
Simulating data from a piecewise pdf occasionally returns an error [duplicate]
In the following code, I generate data from a piecewise PDF. Usually, I get a sample size of ns, but sometimes I get an error message:
Error: RandomVariate::unsdst:...
1
vote
1
answer
124
views
Issue with a Piecewise Diffusion Problem [duplicate]
I'm working on a piecewise diffusion problem in Mathematica where the diffusion coefficient is 1 in the first region (x ≤ 1) and 2 in the second region (x > 1). The initial condition is also ...
0
votes
2
answers
182
views
How to Solve a Piecewise PDE System in Mathematica?
I'm working on a problem involving the transverse vibration of a piecewise beam system. The system consists of two segments with different properties (length, Young's modulus, second moment of area, ...