ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 24 Dec 2015 18:51:14 +0100Maximize the integral of an implicit relation with two parametershttps://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/ Suppose we have an equation:
$${(r\cos{(t)}+u})^{2}+{(-(r\sin{(t)}+v)^3+1)}^{\frac{2}{3}}=1$$
Where $x=r\cos{t}$ and $y=r\sin{t}$
The graph of this implicit relation has two regions, where one part is above the x-axis, and the other part is below the x-axis.
Suppose we're are trying to find the area of the relation above the x-axis, between the x-values ${0}\le{x}\le{2\pi}$. How can one solve for the values of u and v that can give the highest area for this equation that's is above the x-axis, so that u and v as point (u,v) is still inside the implicit relation $$(1-x^2)^3=(1-y^3)$$.
Note: The blue stripes should stop at $2\pi$, and if the equation has regions that are "UNDEFINED", try to ignore it.
**I MADE EDITS!**
Sun, 14 Dec 2014 20:33:04 +0100https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/Comment by Krishnan Arbuja for <p>Suppose we have an equation:
$${(r\cos{(t)}+u})^{2}+{(-(r\sin{(t)}+v)^3+1)}^{\frac{2}{3}}=1$$</p>
<p>Where $x=r\cos{t}$ and $y=r\sin{t}$</p>
<p>The graph of this implicit relation has two regions, where one part is above the x-axis, and the other part is below the x-axis. </p>
<p>Suppose we're are trying to find the area of the relation above the x-axis, between the x-values ${0}\le{x}\le{2\pi}$. How can one solve for the values of u and v that can give the highest area for this equation that's is above the x-axis, so that u and v as point (u,v) is still inside the implicit relation $$(1-x^2)^3=(1-y^3)$$.</p>
<p>Note: The blue stripes should stop at $2\pi$, and if the equation has regions that are "UNDEFINED", try to ignore it.</p>
<p><strong>I MADE EDITS!</strong></p>
https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=25295#post-id-25295Here I made some edits. Hopefully, this could help.Wed, 17 Dec 2014 18:52:53 +0100https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=25295#post-id-25295Comment by Krishnan Arbuja for <p>Suppose we have an equation:
$${(r\cos{(t)}+u})^{2}+{(-(r\sin{(t)}+v)^3+1)}^{\frac{2}{3}}=1$$</p>
<p>Where $x=r\cos{t}$ and $y=r\sin{t}$</p>
<p>The graph of this implicit relation has two regions, where one part is above the x-axis, and the other part is below the x-axis. </p>
<p>Suppose we're are trying to find the area of the relation above the x-axis, between the x-values ${0}\le{x}\le{2\pi}$. How can one solve for the values of u and v that can give the highest area for this equation that's is above the x-axis, so that u and v as point (u,v) is still inside the implicit relation $$(1-x^2)^3=(1-y^3)$$.</p>
<p>Note: The blue stripes should stop at $2\pi$, and if the equation has regions that are "UNDEFINED", try to ignore it.</p>
<p><strong>I MADE EDITS!</strong></p>
https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=25317#post-id-25317Is there anyway I can solve this problem?Sun, 21 Dec 2014 22:48:10 +0100https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=25317#post-id-25317Comment by Krishnan Arbuja for <p>Suppose we have an equation:
$${(r\cos{(t)}+u})^{2}+{(-(r\sin{(t)}+v)^3+1)}^{\frac{2}{3}}=1$$</p>
<p>Where $x=r\cos{t}$ and $y=r\sin{t}$</p>
<p>The graph of this implicit relation has two regions, where one part is above the x-axis, and the other part is below the x-axis. </p>
<p>Suppose we're are trying to find the area of the relation above the x-axis, between the x-values ${0}\le{x}\le{2\pi}$. How can one solve for the values of u and v that can give the highest area for this equation that's is above the x-axis, so that u and v as point (u,v) is still inside the implicit relation $$(1-x^2)^3=(1-y^3)$$.</p>
<p>Note: The blue stripes should stop at $2\pi$, and if the equation has regions that are "UNDEFINED", try to ignore it.</p>
<p><strong>I MADE EDITS!</strong></p>
https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=25446#post-id-25446I doubt my question became clearer. It's been months. If u and v has values that make the function discontinuous isn't part of the answer I'm looking for.Fri, 09 Jan 2015 01:38:12 +0100https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=25446#post-id-25446Answer by slelievre for <p>Suppose we have an equation:
$${(r\cos{(t)}+u})^{2}+{(-(r\sin{(t)}+v)^3+1)}^{\frac{2}{3}}=1$$</p>
<p>Where $x=r\cos{t}$ and $y=r\sin{t}$</p>
<p>The graph of this implicit relation has two regions, where one part is above the x-axis, and the other part is below the x-axis. </p>
<p>Suppose we're are trying to find the area of the relation above the x-axis, between the x-values ${0}\le{x}\le{2\pi}$. How can one solve for the values of u and v that can give the highest area for this equation that's is above the x-axis, so that u and v as point (u,v) is still inside the implicit relation $$(1-x^2)^3=(1-y^3)$$.</p>
<p>Note: The blue stripes should stop at $2\pi$, and if the equation has regions that are "UNDEFINED", try to ignore it.</p>
<p><strong>I MADE EDITS!</strong></p>
https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?answer=25449#post-id-25449<h1>Maximize the integral of an implicit function with two parameters</h1>
<b>Title.</b>
Choosing a good title can help to attract interest to your question.
Your original title, "How to use sage to solve this problem?", says
nothing about the question you want to solve. Actually, remembering
we are on ask-sage, it's sort of an empty title. I suggest changing
the title of your question to
"Maximize the integral of an implicit function with two parameters".
<b>Notation.</b>
Choosing good notation can help geometric intuition.
The relation you want to study involves $u + y \cos x$ and $v + y \sin x$,
so it would be more natural to use $t$ and $r$ instead of $x$ and $y$,
and to use $x$ to denote $u + r \cos t$ and $y$ to denote $v + r \sin t$.
Reworking the relation to eliminate fractional exponents,
we see that the question is about polar parametrizations
with respect to shifted origins $(u, v)$ of the curve $C$ defined by
$$(1-x^2)^3 = (1-y^3)^2.$$
The questions you are interested in are then:
- for which choices of $(u, v)$ does the relation define $r$ as a function of $t$?
- among those, which one gives the largest average for $r(t)$?
One way you can use Sage to get insight into this question
is by plotting the curve $C$.
sage: f(x,y) = (1-x^2)^3 - (1-y^3)^2
sage: implicit_plot(f,(-1.02,1.02),(-0.02,1.3))
You see $C$ is a closed curve enclosing a nonconvex domain.
Appropriate choices of an origin $(u, v)$ for a polar parametrization $r(t)$
are those with respect to which the domain enclosed by $C$ is star-shaped.
Given the look of $C$ at $(0,0)$, $(1,1)$, $(-1,1)$, it seems that
$(u, v) = (0,1)$ is in fact the only appropriate choice, and that
no other choice will let you parametrize $C$ by a continuous
function $r(t)$.
Given that, the maximization problem becomes trivial...Fri, 09 Jan 2015 13:09:27 +0100https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?answer=25449#post-id-25449Comment by Krishnan Arbuja for <h1>Maximize the integral of an implicit function with two parameters</h1>
<p><b>Title.</b>
Choosing a good title can help to attract interest to your question.
Your original title, "How to use sage to solve this problem?", says
nothing about the question you want to solve. Actually, remembering
we are on ask-sage, it's sort of an empty title. I suggest changing
the title of your question to
"Maximize the integral of an implicit function with two parameters".</p>
<p><b>Notation.</b>
Choosing good notation can help geometric intuition.</p>
<p>The relation you want to study involves $u + y \cos x$ and $v + y \sin x$,
so it would be more natural to use $t$ and $r$ instead of $x$ and $y$,
and to use $x$ to denote $u + r \cos t$ and $y$ to denote $v + r \sin t$.</p>
<p>Reworking the relation to eliminate fractional exponents,
we see that the question is about polar parametrizations
with respect to shifted origins $(u, v)$ of the curve $C$ defined by
$$(1-x^2)^3 = (1-y^3)^2.$$</p>
<p>The questions you are interested in are then:</p>
<ul>
<li>for which choices of $(u, v)$ does the relation define $r$ as a function of $t$?</li>
<li>among those, which one gives the largest average for $r(t)$?</li>
</ul>
<p>One way you can use Sage to get insight into this question
is by plotting the curve $C$.</p>
<pre><code>sage: f(x,y) = (1-x^2)^3 - (1-y^3)^2
sage: implicit_plot(f,(-1.02,1.02),(-0.02,1.3))
</code></pre>
<p>You see $C$ is a closed curve enclosing a nonconvex domain.</p>
<p>Appropriate choices of an origin $(u, v)$ for a polar parametrization $r(t)$
are those with respect to which the domain enclosed by $C$ is star-shaped.</p>
<p>Given the look of $C$ at $(0,0)$, $(1,1)$, $(-1,1)$, it seems that
$(u, v) = (0,1)$ is in fact the only appropriate choice, and that
no other choice will let you parametrize $C$ by a continuous
function $r(t)$.</p>
<p>Given that, the maximization problem becomes trivial...</p>
https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=31833#post-id-31833@Slelievere How did you figure this out by using sage software. Can you show me?Thu, 24 Dec 2015 18:51:14 +0100https://ask.sagemath.org/question/25270/maximize-the-integral-of-an-implicit-relation-with-two-parameters/?comment=31833#post-id-31833