Integral with DiracDelta. Can Mathematica be made to solve this?How to solve this integralIntegral of DiracDelta giving an unusual answerHow can I solve this integral analytically?DiracDelta behaves incorrectly on multidimensional integralPartial derivative with Dirac Delta as initial conditionDensity of states from numerical integration and then differentiationIntegral Representation of DiracDeltaCan this integral be calculated using Mathematica?Symbolic IntegralMathematica won't evaluate this integral
Renting a house to a graduate student in my department
Was there a contingency plan in place if Little Boy failed to detonate?
Pre-1993 comic in which Wolverine's claws were turned to rubber?
Is there an idiom that means "revealing a secret unintentionally"?
Why Faces eat each other?
Is it possible to reduce the cost of brewing potions?
Company stopped paying my salary. What are my options?
Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019
how to find out if there's files in a folder and exit accordingly (in KSH)
How did Captain Marvel know where to find these characters?
Are wands in any sort of book going to be too much like Harry Potter?
When do you stop "pushing" a book?
What are these round pads on the bottom of a PCB?
"Estrontium" on poster
Can the president of the United States be guilty of insider trading?
Unicode-math and mathrm result in missing symbols
Is it a good idea to copy a trader when investing?
Narcissistic cube asks who are we?
What's the difference between "ricochet" and "bounce"?
Is it safe to keep the GPU on 100% utilization for a very long time?
Why is it wrong to *implement* myself a known, published, widely believed to be secure crypto algorithm?
What's an appropriate age to involve kids in life changing decisions?
How can I test a shell script in a "safe environment" to avoid harm to my computer?
Is there a need for better software for writers?
Integral with DiracDelta. Can Mathematica be made to solve this?
How to solve this integralIntegral of DiracDelta giving an unusual answerHow can I solve this integral analytically?DiracDelta behaves incorrectly on multidimensional integralPartial derivative with Dirac Delta as initial conditionDensity of states from numerical integration and then differentiationIntegral Representation of DiracDeltaCan this integral be calculated using Mathematica?Symbolic IntegralMathematica won't evaluate this integral
$begingroup$
This was an exam question.
$$
int_0^2 pi delta(sin^2(theta) -x ) ,dtheta
$$
Direct use of Integrate
on it does not give the solution. Is there a trick or workaround? Here is the code I used
ClearAll[theta,x]
integrand = DiracDelta[Sin[theta]^2 - x]
Integrate[ integrand, theta, 0, 2 Pi]
Here is the key solution analytical solution
The solution uses this known relation (half way down the Wikipedia page)
Where the sum above is over all zeros of $g(x)$ in the integration interval. Mathematica does not seem to know this relation?
ps. Maple can't do it either.
calculus-and-analysis
$endgroup$
add a comment |
$begingroup$
This was an exam question.
$$
int_0^2 pi delta(sin^2(theta) -x ) ,dtheta
$$
Direct use of Integrate
on it does not give the solution. Is there a trick or workaround? Here is the code I used
ClearAll[theta,x]
integrand = DiracDelta[Sin[theta]^2 - x]
Integrate[ integrand, theta, 0, 2 Pi]
Here is the key solution analytical solution
The solution uses this known relation (half way down the Wikipedia page)
Where the sum above is over all zeros of $g(x)$ in the integration interval. Mathematica does not seem to know this relation?
ps. Maple can't do it either.
calculus-and-analysis
$endgroup$
add a comment |
$begingroup$
This was an exam question.
$$
int_0^2 pi delta(sin^2(theta) -x ) ,dtheta
$$
Direct use of Integrate
on it does not give the solution. Is there a trick or workaround? Here is the code I used
ClearAll[theta,x]
integrand = DiracDelta[Sin[theta]^2 - x]
Integrate[ integrand, theta, 0, 2 Pi]
Here is the key solution analytical solution
The solution uses this known relation (half way down the Wikipedia page)
Where the sum above is over all zeros of $g(x)$ in the integration interval. Mathematica does not seem to know this relation?
ps. Maple can't do it either.
calculus-and-analysis
$endgroup$
This was an exam question.
$$
int_0^2 pi delta(sin^2(theta) -x ) ,dtheta
$$
Direct use of Integrate
on it does not give the solution. Is there a trick or workaround? Here is the code I used
ClearAll[theta,x]
integrand = DiracDelta[Sin[theta]^2 - x]
Integrate[ integrand, theta, 0, 2 Pi]
Here is the key solution analytical solution
The solution uses this known relation (half way down the Wikipedia page)
Where the sum above is over all zeros of $g(x)$ in the integration interval. Mathematica does not seem to know this relation?
ps. Maple can't do it either.
calculus-and-analysis
calculus-and-analysis
edited 2 hours ago
Nasser
asked 3 hours ago
NasserNasser
59.2k491209
59.2k491209
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
You need to give Integrate
assumptions:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> 0<x<1]
2/Sqrt[-(-1 + x) x]
Unfortunately, Integrate
is not quite smart enough to use the assumption x ∈ Reals
:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> x ∈ Reals]
Integrate[DiracDelta[-x + Sin[θ]^2], θ, 0, 2 π,
Assumptions -> x ∈ Reals]
$endgroup$
$begingroup$
Nice! For some reason, this does not work for exponents other than2
(e.g.,Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?
$endgroup$
– AccidentalFourierTransform
2 hours ago
2
$begingroup$
@AccidentalFourierTransform One hack is to replacex
withEulerGamma
, that will produce a result forSin[θ]^3 - x
, which you can then extrapolate into a generic answer.
$endgroup$
– Carl Woll
2 hours ago
add a comment |
$begingroup$
f[θ_, x_] := Sin[θ]^2 - x
Derivative[1, 0][f][θ, x] /. Solve[f[θ, x] == 0, 0 < θ < 2 π, θ, Reals]
Integrate[DiracDelta[x - θ]/Abs[%], θ, 0, 2 π] // Total
This code should also work for other functions $f$, presumably.
$endgroup$
$begingroup$
You have an extra[θ, x]
, and yourSolve
would work better if you added the domainReals
. Probably more robust than just relying onIntegrate
.
$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197963%2fintegral-with-diracdelta-can-mathematica-be-made-to-solve-this%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You need to give Integrate
assumptions:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> 0<x<1]
2/Sqrt[-(-1 + x) x]
Unfortunately, Integrate
is not quite smart enough to use the assumption x ∈ Reals
:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> x ∈ Reals]
Integrate[DiracDelta[-x + Sin[θ]^2], θ, 0, 2 π,
Assumptions -> x ∈ Reals]
$endgroup$
$begingroup$
Nice! For some reason, this does not work for exponents other than2
(e.g.,Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?
$endgroup$
– AccidentalFourierTransform
2 hours ago
2
$begingroup$
@AccidentalFourierTransform One hack is to replacex
withEulerGamma
, that will produce a result forSin[θ]^3 - x
, which you can then extrapolate into a generic answer.
$endgroup$
– Carl Woll
2 hours ago
add a comment |
$begingroup$
You need to give Integrate
assumptions:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> 0<x<1]
2/Sqrt[-(-1 + x) x]
Unfortunately, Integrate
is not quite smart enough to use the assumption x ∈ Reals
:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> x ∈ Reals]
Integrate[DiracDelta[-x + Sin[θ]^2], θ, 0, 2 π,
Assumptions -> x ∈ Reals]
$endgroup$
$begingroup$
Nice! For some reason, this does not work for exponents other than2
(e.g.,Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?
$endgroup$
– AccidentalFourierTransform
2 hours ago
2
$begingroup$
@AccidentalFourierTransform One hack is to replacex
withEulerGamma
, that will produce a result forSin[θ]^3 - x
, which you can then extrapolate into a generic answer.
$endgroup$
– Carl Woll
2 hours ago
add a comment |
$begingroup$
You need to give Integrate
assumptions:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> 0<x<1]
2/Sqrt[-(-1 + x) x]
Unfortunately, Integrate
is not quite smart enough to use the assumption x ∈ Reals
:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> x ∈ Reals]
Integrate[DiracDelta[-x + Sin[θ]^2], θ, 0, 2 π,
Assumptions -> x ∈ Reals]
$endgroup$
You need to give Integrate
assumptions:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> 0<x<1]
2/Sqrt[-(-1 + x) x]
Unfortunately, Integrate
is not quite smart enough to use the assumption x ∈ Reals
:
Integrate[DiracDelta[Sin[θ]^2-x], θ, 0, 2 π, Assumptions -> x ∈ Reals]
Integrate[DiracDelta[-x + Sin[θ]^2], θ, 0, 2 π,
Assumptions -> x ∈ Reals]
answered 2 hours ago
Carl WollCarl Woll
77.7k3102204
77.7k3102204
$begingroup$
Nice! For some reason, this does not work for exponents other than2
(e.g.,Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?
$endgroup$
– AccidentalFourierTransform
2 hours ago
2
$begingroup$
@AccidentalFourierTransform One hack is to replacex
withEulerGamma
, that will produce a result forSin[θ]^3 - x
, which you can then extrapolate into a generic answer.
$endgroup$
– Carl Woll
2 hours ago
add a comment |
$begingroup$
Nice! For some reason, this does not work for exponents other than2
(e.g.,Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?
$endgroup$
– AccidentalFourierTransform
2 hours ago
2
$begingroup$
@AccidentalFourierTransform One hack is to replacex
withEulerGamma
, that will produce a result forSin[θ]^3 - x
, which you can then extrapolate into a generic answer.
$endgroup$
– Carl Woll
2 hours ago
$begingroup$
Nice! For some reason, this does not work for exponents other than
2
(e.g., Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?$endgroup$
– AccidentalFourierTransform
2 hours ago
$begingroup$
Nice! For some reason, this does not work for exponents other than
2
(e.g., Sin[θ]^3 - x
). My code does not work either, presumably for the same reason (Solve
is unable to determine the roots). Any idea how to work around this?$endgroup$
– AccidentalFourierTransform
2 hours ago
2
2
$begingroup$
@AccidentalFourierTransform One hack is to replace
x
with EulerGamma
, that will produce a result for Sin[θ]^3 - x
, which you can then extrapolate into a generic answer.$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@AccidentalFourierTransform One hack is to replace
x
with EulerGamma
, that will produce a result for Sin[θ]^3 - x
, which you can then extrapolate into a generic answer.$endgroup$
– Carl Woll
2 hours ago
add a comment |
$begingroup$
f[θ_, x_] := Sin[θ]^2 - x
Derivative[1, 0][f][θ, x] /. Solve[f[θ, x] == 0, 0 < θ < 2 π, θ, Reals]
Integrate[DiracDelta[x - θ]/Abs[%], θ, 0, 2 π] // Total
This code should also work for other functions $f$, presumably.
$endgroup$
$begingroup$
You have an extra[θ, x]
, and yourSolve
would work better if you added the domainReals
. Probably more robust than just relying onIntegrate
.
$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
add a comment |
$begingroup$
f[θ_, x_] := Sin[θ]^2 - x
Derivative[1, 0][f][θ, x] /. Solve[f[θ, x] == 0, 0 < θ < 2 π, θ, Reals]
Integrate[DiracDelta[x - θ]/Abs[%], θ, 0, 2 π] // Total
This code should also work for other functions $f$, presumably.
$endgroup$
$begingroup$
You have an extra[θ, x]
, and yourSolve
would work better if you added the domainReals
. Probably more robust than just relying onIntegrate
.
$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
add a comment |
$begingroup$
f[θ_, x_] := Sin[θ]^2 - x
Derivative[1, 0][f][θ, x] /. Solve[f[θ, x] == 0, 0 < θ < 2 π, θ, Reals]
Integrate[DiracDelta[x - θ]/Abs[%], θ, 0, 2 π] // Total
This code should also work for other functions $f$, presumably.
$endgroup$
f[θ_, x_] := Sin[θ]^2 - x
Derivative[1, 0][f][θ, x] /. Solve[f[θ, x] == 0, 0 < θ < 2 π, θ, Reals]
Integrate[DiracDelta[x - θ]/Abs[%], θ, 0, 2 π] // Total
This code should also work for other functions $f$, presumably.
edited 2 hours ago
answered 2 hours ago
AccidentalFourierTransformAccidentalFourierTransform
5,18311042
5,18311042
$begingroup$
You have an extra[θ, x]
, and yourSolve
would work better if you added the domainReals
. Probably more robust than just relying onIntegrate
.
$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
add a comment |
$begingroup$
You have an extra[θ, x]
, and yourSolve
would work better if you added the domainReals
. Probably more robust than just relying onIntegrate
.
$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
$begingroup$
You have an extra
[θ, x]
, and your Solve
would work better if you added the domain Reals
. Probably more robust than just relying on Integrate
.$endgroup$
– Carl Woll
2 hours ago
$begingroup$
You have an extra
[θ, x]
, and your Solve
would work better if you added the domain Reals
. Probably more robust than just relying on Integrate
.$endgroup$
– Carl Woll
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
$begingroup$
@CarlWoll Ah, yes, thank you!
$endgroup$
– AccidentalFourierTransform
2 hours ago
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197963%2fintegral-with-diracdelta-can-mathematica-be-made-to-solve-this%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown