ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 22 Sep 2019 01:29:46 -0500Simplification and implicit functionhttps://ask.sagemath.org/question/48010/simplification-and-implicit-function/I have two question in one :
1) I have this $z= \frac{\alpha x^{\alpha-1}y^\beta y^{-\beta-1}}{\beta x^\alpha}$. There are obvious simplification since this is equal to $\frac{\alpha}{\beta}
\frac{y}{x}$.
z.full_simplify() has no impact
z.expand() simplify on $y$ but not on $x$
So what can I do to obtain the good result.
2) how to take the result and consider it as an implicit function to obtain the derivative de $y$. as a function of xSat, 21 Sep 2019 09:21:08 -0500https://ask.sagemath.org/question/48010/simplification-and-implicit-function/Answer by Emmanuel Charpentier for <p>I have two question in one :
1) I have this $z= \frac{\alpha x^{\alpha-1}y^\beta y^{-\beta-1}}{\beta x^\alpha}$. There are obvious simplification since this is equal to $\frac{\alpha}{\beta}
\frac{y}{x}$.</p>
<p>z.full_simplify() has no impact
z.expand() simplify on $y$ but not on $x$</p>
<p>So what can I do to obtain the good result.</p>
<p>2) how to take the result and consider it as an implicit function to obtain the derivative de $y$. as a function of x</p>
https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?answer=48015#post-id-48015> I have two question in one : 1) I have this $z=\frac{αx^{α−1}y^βy^{−β−1}}{βx^α}$. There are obvious simplification since this is equal to $\frac{α}{β}\frac{y}{x}$.
It isn't:
sage: foo=a*x^(a-1)*y^b*y^-(b+1)/(b*x^a);foo
a*x^(a - 1)*y^b*y^(-b - 1)/(b*x^a)
sage: foo.canonicalize_radical()
a/(b*x*y)
> 2) how to take the result and consider it as an implicit function to obtain the derivative de y. as a function of x
sage: foo.canonicalize_radical().diff(y)
-a/(b*x*y^2)
which should be obvious given the (correct) result of your simplification...
Sat, 21 Sep 2019 10:08:35 -0500https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?answer=48015#post-id-48015Comment by Emmanuel Charpentier for <blockquote>
<p>I have two question in one : 1) I have this $z=\frac{αx^{α−1}y^βy^{−β−1}}{βx^α}$. There are obvious simplification since this is equal to $\frac{α}{β}\frac{y}{x}$.</p>
</blockquote>
<p>It isn't:</p>
<pre><code>sage: foo=a*x^(a-1)*y^b*y^-(b+1)/(b*x^a);foo
a*x^(a - 1)*y^b*y^(-b - 1)/(b*x^a)
sage: foo.canonicalize_radical()
a/(b*x*y)
</code></pre>
<blockquote>
<p>2) how to take the result and consider it as an implicit function to obtain the derivative de y. as a function of x</p>
</blockquote>
<pre><code>sage: foo.canonicalize_radical().diff(y)
-a/(b*x*y^2)
</code></pre>
<p>which should be obvious given the (correct) result of your simplification...</p>
https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?comment=48021#post-id-48021And, by the way:
sage: U
(x, y) |--> A*x^alpha*y^beta
sage: (U(x,y).diff(x)/U(x,y).diff(y)).canonicalize_radical()
alpha*y/(beta*x)Sun, 22 Sep 2019 01:29:46 -0500https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?comment=48021#post-id-48021Comment by Emmanuel Charpentier for <blockquote>
<p>I have two question in one : 1) I have this $z=\frac{αx^{α−1}y^βy^{−β−1}}{βx^α}$. There are obvious simplification since this is equal to $\frac{α}{β}\frac{y}{x}$.</p>
</blockquote>
<p>It isn't:</p>
<pre><code>sage: foo=a*x^(a-1)*y^b*y^-(b+1)/(b*x^a);foo
a*x^(a - 1)*y^b*y^(-b - 1)/(b*x^a)
sage: foo.canonicalize_radical()
a/(b*x*y)
</code></pre>
<blockquote>
<p>2) how to take the result and consider it as an implicit function to obtain the derivative de y. as a function of x</p>
</blockquote>
<pre><code>sage: foo.canonicalize_radical().diff(y)
-a/(b*x*y^2)
</code></pre>
<p>which should be obvious given the (correct) result of your simplification...</p>
https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?comment=48020#post-id-48020Okay.
sage: foo.canonicalize_radical()
a/(b*x*y)
sage: foo.canonicalize_radical().diff(y)
-a/(b*x*y^2)
sage: foo.diff(y)
a*x^(a - 1)*y^(b - 1)*y^(-b - 1)/x^a - a*(b + 1)*x^(a - 1)*y^b*y^(-b - 2)/(b*x^a)
sage: foo.diff(y).canonicalize_radical()
-a/(b*x*y^2)
**Where** is this "obviously wrong" ?Sun, 22 Sep 2019 01:25:04 -0500https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?comment=48020#post-id-48020Comment by Cyrille for <blockquote>
<p>I have two question in one : 1) I have this $z=\frac{αx^{α−1}y^βy^{−β−1}}{βx^α}$. There are obvious simplification since this is equal to $\frac{α}{β}\frac{y}{x}$.</p>
</blockquote>
<p>It isn't:</p>
<pre><code>sage: foo=a*x^(a-1)*y^b*y^-(b+1)/(b*x^a);foo
a*x^(a - 1)*y^b*y^(-b - 1)/(b*x^a)
sage: foo.canonicalize_radical()
a/(b*x*y)
</code></pre>
<blockquote>
<p>2) how to take the result and consider it as an implicit function to obtain the derivative de y. as a function of x</p>
</blockquote>
<pre><code>sage: foo.canonicalize_radical().diff(y)
-a/(b*x*y^2)
</code></pre>
<p>which should be obvious given the (correct) result of your simplification...</p>
https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?comment=48017#post-id-48017In fact my problem was nearly similar but with your helps I have understud what was wrong in my approach. In reality I had $tms= U_x/U_y$ where the U_(x or y) where the partial dérivatives of U(x, Y) = A x^\alpha y{^\1- beta}. Even with canonicalize.radical I was unable to obtain you result since I was writing U_x/U_y.canonalize.radical() and not (U_x/U_y).canonalize.radical(). Thanks for all.
Now for 2) your result is obviously wrong since you Don't use the implicit command differenti&tionSat, 21 Sep 2019 12:48:37 -0500https://ask.sagemath.org/question/48010/simplification-and-implicit-function/?comment=48017#post-id-48017