ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 22 Sep 2019 15:29:22 -0500A last substitutionhttp://ask.sagemath.org/question/48033/a-last-substitution/The result of the following code is perfectly normal.
%display latex
var('A, x, y, l, alpha, beta, R, p_x, p_y');
assume(A>0,alpha>0,beta>0,x>0,y>0);
U=A*x^(alpha)*y^(beta);
U_x= U.diff(x);
U_y= U.diff(y);
tms=(U_x/U_y).canonicalize_radical();
var('x,y')
y= function('y');
tms1=(U_x/U_y).substitute(y=y(x)).canonicalize_radical();
tms1.diff(x)
courbtms=solve(tms1.diff(x)==0, y(x).diff(x),solution_dict=True)
courbtms
but it looks like this
$\left[\frac{\partial}{\partial x}y(x) = \frac{y(x)}{x}\right]$
It's the first time I see this type of brackets. I can extract the right member of this equation
courbtms[0][y(x).diff(x)]
but what I am not able to obtain is to substitue backward $y$ to $y(x)$? I have tried
courbtms[0][y(x).diff(x)].substitute[y(x)=z]
but it obviously doesn't work.CyrilleSun, 22 Sep 2019 15:29:22 -0500http://ask.sagemath.org/question/48033/Change of programmation of implicithttp://ask.sagemath.org/question/48022/change-of-programmation-of-implicit/ In the former question "Calculus with formal functions: substitution?", one can obtain implicit differentiation by the following code
var('f,x,y')
y = function('y',x)
f = function('f',x,y)
f.diff(x)
which gives
D[1](f)(x, y(x))*D[0](y)(x) +D[0](f)(x, y(x))
But I use the last version ofg SageMath and I have the following error
TypeError: function() takes exactly 1 positional argument (2 given)
Is there some new way to handle this code ?CyrilleSun, 22 Sep 2019 03:31:09 -0500http://ask.sagemath.org/question/48022/How to substitute a function in a derivativehttp://ask.sagemath.org/question/48007/how-to-substitute-a-function-in-a-derivative/ I know that if $U(x, y) = A x^\alpha y^\beta$, I have $U_x = \alpha A x^{\alpha-1} y ^\beta$. But by substitution, I can obtain $U_x = \alpha \left(\frac{U}{x}\right\)$. Is there a way to obtain this in Sagemath. I have tried
U_x= U.diff(x).subs(A*x^(alpha)*y^(beta)== U)
but this has no effect.
CyrilleSat, 21 Sep 2019 07:29:05 -0500http://ask.sagemath.org/question/48007/Simplification and implicit functionhttp://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 xCyrilleSat, 21 Sep 2019 09:21:08 -0500http://ask.sagemath.org/question/48010/how to run maxima code in Sage?http://ask.sagemath.org/question/40184/how-to-run-maxima-code-in-sage/I have the following code in maxima to calculate the laplacian of a function in parabolic coordinates.
assume(r≥0)$
assume(theta≥0,theta≤2*π)$
load(vect)$
derivabbrev:true$
scalefactors(parabolic)$
declare(f,scalar)$
depends(f,rest(parabolic))$
ev(express(laplacian(f)),diff,expand,factor);
What is the proper way to run those Maxima commands in SageMath?
Thanks,
DanieldanielvolinskiSat, 16 Dec 2017 09:47:28 -0600http://ask.sagemath.org/question/40184/Gradient, Divergence, Curl and vector productshttp://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/Are there implementations of vector product and the nabla operator yet? I can't find anything.KiMon, 21 Oct 2013 05:40:22 -0500http://ask.sagemath.org/question/10104/Nodal analysis in networkhttp://ask.sagemath.org/question/23624/nodal-analysis-in-network/Hi experts!
I have:
* Q nodes (Q stick-stick intersections)
* a list 'NODES'=[(x,y,i,j)_1,........, (x,y,i,j)_Q], where each element (x,y,i,j) represent the intersection point (x,y) of the sticks i and j.
* a matrix 'H' with QxQ elements {H_k,l}.
H_k,l=0 if nodes 'k' and 'l' aren't joined by a edge, and H_k,l = R_k,l = the electrical resistance associated with the union of the nodes 'k' and 'l' (directly proportional to the length of the edge that connects these nodes).
* a list 'nodes_resistances'=[R_1, ....., R_Q].
All nodes with 'j' (or 'i') = N+1 have a electric potential 'V' respect all nodes with 'j' or 'i' = N.
Now i must apply NODAL ANALYSIS for determinate the electrical current through each of the edges, and the net current. I have no ideas about how to do that. Can you help me?
Thanks a lot!
Best regards
mresimulatorTue, 29 Jul 2014 07:24:51 -0500http://ask.sagemath.org/question/23624/Social Network Analysishttp://ask.sagemath.org/question/10652/social-network-analysis/I would like to know if there is any features in Sage to analise social networks like:
> ## Social Network Analysis ##
Drawing on Mathematica's strong graph and network capabilities, Mathematica 9 introduces a complete and rich set of state-of-the art social network analysis functions. Access to social networks from a variety of sources, including directly from social media sites, and high level functions for community detection, cohesive groups, centrality, and similarity measures make performing network analysis tasks easier and more flexible than ever before.
----------
I mean exactly anlysis of the real networks not graph theory.bakantWed, 23 Oct 2013 23:57:31 -0500http://ask.sagemath.org/question/10652/Time series analysishttp://ask.sagemath.org/question/8086/time-series-analysis/Being new to TSA, I have some basic questions.
I have 5 minute interval sales data that I want to plot. The plot should have lower, higher and current estimate along with new 1 day prediction.
I understand I can use Holt Winters formula or ARIMA. Can someone help me achieve this (steps and methods) using SAGE?NIshantWed, 20 Apr 2011 02:31:25 -0500http://ask.sagemath.org/question/8086/