usually, symbolic functions return vectors for vector inputs:
syms('x');
f=x*2;
subs(f,[1 2 3])
outputs: [2 4 6]
but doing
f=sym('0');
subs(f,[1 2 3]);
outputs: 0
and not: [0 0 0]
so basically, my questions is how do I make f behave as a "normal" symbolic function.
I can do something ugly like f=x-x to create a function that alway...
I'm writing a piece of client-side javascript code that takes a function and finds the derivative of it, however, the regex that's supposed to match with the power rule fails to work in the context of the javascript program, even though it sucessfully matches when it's used with an independent regex tester.
The code is extremely bare-bo...
I'm trying to use [SymPy][1] to substitute multiple terms in an expression at the same time. I tried the [subs function][2] with a dictionary as parameter, but found out that it substitutes sequentially.
In : a.subs({a:b, b:c})
Out: c
The problem is the first substitution resulted in a term that can be substituted by the second substi...
Uu[z_,x_,t_] := A1[z]*F[t*a*x]
Wu[z_,x_,t_] := B1[z]*F[t*a*x]
Pu[z_,x_,t_] := C1[z]*F[t*a*x]
eq1 = D[Uu[z,x,t],t]==-R*D[Pu[z,x,t],x];
C1z = DSolve[eq1,C1[z],z];
eq2 = D[Wu[z,x,t],t]==-R*D[Pu[z,x,t],z]/.C1z[[1]]
The assignment /.C1z[[1]] does not behave the way I expect it to. I am unsure of even what this pheonomena is called, (which ...
I need to manipulate expressions like 1 + sqrt(3) and do basic arithmetic like addition, subtraction, and division. I'd like the result to be in some sort of canonical form so that it can be used as a key in a map. Turning 1 + sqrt(3) into a float is not feasible due to roundoff problems.
I used SymPy for this task in Python. Is there a...
Can anyone recommend a good symbolic math/CAS library for Java? If you have actually used the library, can you list any pros/cons regarding the API or general usage?
Thanks!
...
I am working on a project to create a generic equation solver... envision this to take the form of 25-30 equations that will be saved in a table- variable names along with the operators.
I would then call this table for solving any equation with a missing variable and it would move operators/ other pieces to the other side of the missi...
I am trying to generate a piecewise symbolic function in Matlab. The reason it has to be symbolic is I want to be able to integrate/differentiate the function afterwards and/or insert actual values. I have the following function:
x^3/6 -> 0 < x <= 1
(1/6)*(-3*x^3+12*x^2-12x+4) -> 1 < x <= 2
(1/6)*(3*x^3-24*x^2+60x-44) -> 2 <...
Hello, I have come across the following F# sample and found it intriguing.
http://www.codeproject.com/KB/net-languages/SymbolicCalcInFS.aspx
Does Clojure have language/library facilities for doing something like this with ease? It is ok to force Polish notation for formulas, if that makes things easier.
Thanks, and let me know if ther...
this is a little complicated. i spent 2 weeks on this, so i'd love ur input or suggestion how to figure it out or where to post.
in short, i have an expression that contains multiplications between p1,p2,q1 and q2, and i'd like to use [qi,pi]=ii*hb, where i={1,2} to get the expression to a symmetric form (pi^a*qi^b+qi^b*pi^a)/2.
so for...
Short version:
I am interested in some Clojure code which will allow me to specify the transformations of x (e.g. permutations, rotations) under which the value of a function f(x) is invariant, so that I can efficiently generate a sequence of x's that satisfy r = f(x). Is there some development in computer algebra for Clojure?
For (a tri...