2022-11-30 19:37:06 +0100 | received badge | ● Popular Question (source) |
2020-01-24 10:06:27 +0100 | received badge | ● Famous Question (source) |
2018-11-24 15:23:49 +0100 | received badge | ● Notable Question (source) |
2018-11-24 15:23:49 +0100 | received badge | ● Popular Question (source) |
2017-09-04 20:09:23 +0100 | received badge | ● Notable Question (source) |
2016-05-20 19:58:00 +0100 | received badge | ● Popular Question (source) |
2015-07-29 20:21:39 +0100 | asked a question | Substituting derivative in equation There is likely a simple way to solve this, but I cannot seem to find a way. Let say I have two functions, f(x,y) and g(x,y)
I want to be able to substitute a value for one of the derivatives. For example, if I have the equation x^2y+f.diff(x,1), I may want to substitute in the function g, so I have x^2y+g. I tried the following
And get an error that a keyword can't be an expression. Is there anyway to make this substitution? |
2015-06-18 23:13:24 +0100 | commented answer | Taylor expansion assumptions I have the same thing; however, I was considering the case where z>y+1, so the solution given isn't correct in that case. The solution I gave was the general analytic form, not the one Sage gave. |
2015-06-18 20:43:17 +0100 | asked a question | Taylor expansion assumptions This is a very simply question, but I can't seem to get an appropriate answer in Sage. Let's say I have the following function:f(x,y,z)=sqrt(x^2+(y+1-z)^2). The taylor expansion around x=0 is sqrt((y+1-z)^2)+x^2/(2*sqrt((y+1-z)^2)) (analytic form, not the value Sage gives). Is it possible for Sage to take assumptions into account when expanding? For example, if I have assume(y>0,z>0,z>y+1), then clearly, (y+1-z)<0, so when simplifying, sqrt((y+1-z)^2)=z-y-1. However, Sage simply gives me the same answer regardless of assumption. Is there a way to fix this? |
2015-06-17 18:15:00 +0100 | commented answer | issue with variable assumptions However, this does not really simplify. Is there something like canonicalize_radicals() that takes assumptions into account? For example, I have the following expression, that won't simplify further sqrt(((M - r)mu + M)^2 + (mu^2 - 1)(2Mr - r^2))), but in Mathematica correctly simplifies to sqrt((mu*M+M-r)^2). canonical_radical finds the solution, but does not get the correct assumptions |
2015-06-17 17:13:36 +0100 | received badge | ● Editor (source) |
2015-06-17 16:45:56 +0100 | commented answer | issue with variable assumptions Thank you! I was using canonicalize.radical(), which is what I assume was the issue. |
2015-06-17 16:45:19 +0100 | received badge | ● Scholar (source) |
2015-06-16 23:08:55 +0100 | asked a question | using lists in multivariable functions I wish to create a function that uses elements from a list and is used later on. For example, I have an array
This is all what I want. I then want to take R(r,b,u) in another function: Y(r,b,u,m), so that it gets the result I have above. I can't seem to get a way to run through all the possibilities (I could use a loop, but that ends up getting a bit messy as I go deeper in) Edit: The values for mi and bi will eventually have numerical values, but currently they are simply symbolic variables. I am currently using this to simplify some algebraic expressions. |
2015-06-16 19:49:11 +0100 | asked a question | issue with variable assumptions I am using sage to compute a variety of algebra, and often times, when calculating the squareroots of variables, sage gets the assumptions wrong. Here is a short example:
Clearly the last line is incorrect (should be r-2M), but I have no idea how to fix it. While this is a trivial example, I frequently work with equations that are many variables in length, where ensuring that the correct variables are positive is a requirement. Edit: I found a partial solution, however it does not seem to work well with simplifying radicals. If there is an alternative to canonicalize_radical which takes assumptions into account, it would be helpful. |