Questions tagged [maxima]
Maxima is an opensource Computer Algebra System based on the legendary Macsyma. NOTE: This tag has NOTHING to do with 'finding the maxima' - for that, please use [max].
0
votes
0answers
24 views
Assigning value and evaluating derivative both numerically and symbolically
I have the following single order differential function:
y' = x^2- y^2
and the initial condition is
y(0) = 1
I am evaluating higher differentials as follows:
y'' = 2 * x - y * y'
y''' = 2 - 2 *...
-4
votes
0answers
20 views
maxima - how to implement or execute the maxima script into php code? [closed]
my question about how to call script maxima in the picture enter image description here this is maxima code
to implement in php code ?
1
vote
0answers
20 views
Is it necessary in this case to manually help Maxima solve this system of equations?
I have a list of these 4 equations with 4 unknowns. I would like to solve them with maxima. However the following code doesn't return a result.
eq1:I1^2+R1^2=Len1^2;
eq2:I2^2+R2^2=Len2^2;
eq3:R1+R2=U;...
0
votes
0answers
16 views
Changing variables in implicit function in Maxima
I have an implicit function f which depends from (x,t) and want to use expression
f+integrate(f,y,x_0,x)
In the integral the variable x should be changed for y.
I tried something like
f+integrate(...
1
vote
1answer
19 views
Simplify equation after solving
In Maxima I put:
q_d: 1000-5*p_d;
q_s: -250+2*p_s;
p_d: (1+t)*p_s;
eq:q_d = q_s;
solve(eq,p_s);
EC: 10*q_d + 0.01 * (q_d**2);
get the result
p_s=1250/(5*t+7)
0.01*(1000-5*p_s*(t+...
2
votes
1answer
23 views
Why is wxMaxima not integrating the following input, and merely polishing the input as a result instead?
When I input:
integrate((sqrt(x+sqrt(x+1))),x);
It results in:
integrate(sqrt(sqrt(x+1)+x),x)
The result is displayed in a more organized manner. However, it does not give me the integral. Why?
0
votes
0answers
14 views
Taylor Series Expansion
I have some rather complicated equations in maxima :
alpha: -sin( \theta ) / ( l * (M+m-m*sin(\theta)*sin(\theta)) );
beta: 1 / ( M+m-m*sin(\theta) );
gamma : -m*l* ('diff( \theta, t ) )^2 * cos(\...
1
vote
1answer
12 views
In Maxima how do I get the row sums of a matrix?
e.g.
matrix:
a b c
d e f
g h i
->
column vector
a+b+c
d+e+f
g+h+i
I can think of ugly solutions with sum, and maybe less ugly solutions with multiplying by a row vector, but is there a ...
1
vote
1answer
13 views
In Maxima, how do I get the elementwise (Hadamard) product of two matrices?
In Maxima, how do I get the elementwise (Hadamard) product of two matrices?
e.g
a b
c d
*
e f
g h
->
a*e b*f
c*e d*h
2
votes
1answer
45 views
How to expand in taylor series a composition of functions?
I would like to expand in taylor series a function of type : f(x+f(x)) around x=a in the case where f(a)=0.
(%i1) atvalue(f(x),[x=a],0)$
The direct calculus yields :
(%i2) taylor(f(x+f(x)),x,a,2);
...
1
vote
1answer
23 views
Maxima indexed variables assigned in evaluation of function
I'd like to use an indexed variable in a function definition (this is a MWE, in the real world I have many a[i], used as coefficients of a polynomial)
f(x):=a[0]*x $
But when I evaluate this ...
-1
votes
1answer
22 views
How to dynamically define multiple polynomials inside a loop in Maxima
So...I want to create five different polynomials inside a loop in order to make a Sturm sequence, but I don't seem to be able to dynamically name a set of polynomials with different names.
For ...
0
votes
1answer
30 views
Maxima - cannot plot my equation with plot2d, as “expression evaluates to non-numeric value everywhere in plotting range”
With Maxima, I want to plot the value of a parameter depending on time by solving an equation for that specific parameter. I am new to Maxima and I already struggle with the beginning of my ...
0
votes
1answer
50 views
How does one draw a graph in maxima
I dont know how to draw a graph in maxima where i need to point out (eg. points have to be seen on the graph) the local extrema and realroots. I have calculated them but I have no idea how to ...
2
votes
0answers
14 views
How do I tell Maxima about valid approximations of subexpressions of a large expression?
I have a fairly large expression that involves a lot of subexpressions of the form (100*A^3 + 200*A^2 + 100*A)*x or (-A^2 - A)*y or (100*A^2 + 100*A)*z
I know, but I don't know how to tell Maxima ...
3
votes
2answers
58 views
Maxima plot with dashed line
How can we plot in maxima with different line styles (for example dash, dash-dot, etc. and not just change the color of the lines).
Minimal working example:
f(x) := sin(x) $
g(x) := cos(x) $
plot2d( ...
2
votes
1answer
25 views
Maxima plot discrete data with 3 columns
How to plot a discrete dataset with 3 or more columns? MWE is as follows:
/* Required essentially to create the data set */
eqn1: 4 - x^2 - 4*y^2$
eqn2: y^2 - x^2 + 1$
sol: rk([eqn1,eqn2],[x,y],[-1....
1
vote
0answers
52 views
How to solve matrix equation in Maxima involving determinant?
I need to get alpha values out of this equation in Maxima which involves determinant. By the way, M and K are 8x8 matrices and they are known, only unknown is alpha. Can someone suggest a way to solve ...
0
votes
1answer
17 views
Is it possible to construct a while loop with an indeterminate number of repetitions in Maxima
I have an inequality A.x >= b, where A is a row vector (a Maxima matrix), x a column vector whose each element is nonnegative and b some positive constant. If the coefficients in the matrix A are ...
1
vote
0answers
35 views
Path that maxima can read when called from php
I need to run maxima commands from php.
I have two linux servers with identical Centos and Maxima setups, but PHP versions are 7.18 and 7.19 respectively.
I have a directory containing the files "test....
1
vote
1answer
53 views
Solve() and Assume() in Maxima
I'm trying to solve a trigonometric function assuming positive values of the independent variable. However seems like Maxima does not take into account such assumption for the solve routine.
assume(...
0
votes
1answer
31 views
Display and save plot simultaneously in maxima
Currently, I can display the plot in maxima as follows:
f(x) := sin(x)$
g(x) := cos(x)$
plot2d([f(x), g(x)], [x,-5,5],[legend,"sin(x)","cos(x)"],
[xlabel,"x"],[ylabel,"y"],
[gnuplot_preamble,"set ...
0
votes
1answer
38 views
Maxima solve equation
I am new to maxima.
Wanted to know how to extract the solution for solve? Example:
(%i1) soln: solve([x^2 - 9 =0], [x]);
(soln) [x=-3,x=3]
How to extract the values -3 and 3 and assign them to some ...
1
vote
2answers
16 views
Replace certain matrix elements with zeros in Maxima
I'm trying to change the elements of a matrix hat are equal to und into zeros. I tried accomplishing this with a matrix map but it didn't work:
und_to_zero(element) := block( [], if ( is( element = ...
0
votes
1answer
11 views
wxmaxima: plotting a discrete data - can I call the data from an exterior file?
I have a data ([x1,y1],....,[xn,yn])
where $n$ is large, around 700.
I want to plot these data in wxmaxima.
The question is:
can I store these data in an exterior .txt or .wxmx file and call it ...
2
votes
1answer
17 views
maxima substpart without knowing position
If I want to replace a part of an expression, I can use substpart. But I need to know the position of the part in the expression, given by its position in the part
Now I have as example:
$$\int_{0}^{...
2
votes
1answer
37 views
maxima gradef differentiation
I try to define the derivative of the standard normal pdf in terms of the function:
φ(x) := exp (-x^2/2)/sqrt(2 * %pi);
gradef(φ(x),-x*φ(x));
but if I type then:
diff(φ(x),x);
I get:
-(x*%e^(-x^2/...
2
votes
2answers
20 views
From symbolic to proper differentiation in Maxima
I'm struggling to find a way to switch from a symbolic declaration of the differential operator to its implementation
I give you an example.
F: (10-'diff(x(t),t)^2 -2*x(t)*'diff(x(t),t) -5*x(t)^2)*%...
1
vote
0answers
43 views
wxMaxima assertion failed: “lang == wxLANGUAGE_DEFAULT”
Installed wxmaxima from the ubuntu 18.04 repository after a fresh install of ubuntu. However I get the following error:
An assertion failed:
../src/common/intl.cpp(1071): assert "lang == ...
2
votes
1answer
32 views
Change standard tex output of multiplication in maxima
We try to change the way maxima translates multiplication when converting to tex.
By default maxima gives a space: \,
We changed this to our own latex macro that looks like a space, but in that way ...
1
vote
1answer
12 views
Calculate the sum of the elements of an elementwise product of two matrices in Maxima
What's in the title and I've tried thus far:
sum(lambda([i,j], M[i,j] * Ma[i,j]))
This expression gives me the Wrong number of arguments error. Doesn't sum() operate on lists, or am I missing ...
1
vote
2answers
54 views
Differential operator in Sympy or in Wxmaxima
Is it possible to generate linear differential operator with open source softwares such as sympy or wxmaxima and apply it to a function. For example, let differential operator L be:
L = d^2/dx^2 + ...
0
votes
0answers
29 views
how to find the minimum and maximum of a function of two variables in wxmaxima?
As i am new to maxima can one help with a program to find the
minimum and maximum of a function of two variables in using maxima programming
the easiest way to a student?
0
votes
1answer
37 views
PuLP in Python Not Finding Maximum
I've been using the code below for some time now and it's always been able to find the max/min except for now.
I get one corner point to this: x=168, y=192, objective=3288
But there is a corner ...
1
vote
1answer
18 views
Evaluation under the derivative
I give
depends(u,r)$
er : diff(u,r)$
er, u = r^2;
I am getting:
d 2
(%o47) -- (r )
...
1
vote
2answers
53 views
Extracting a List from a List of Lists (Maxima)
I am using maxima, and I believe I have a simple question: How do I put the eigenvalues of a matrix in a list, so that I can compute the largest eigenvalue?
From what I'm reading, if M is a matrix, ...
1
vote
1answer
30 views
Matching quotient function in maxima
We have an online platform where we use maxima on the backend to give feedback on the answers that the student give.
Say that the solution of a polynomial long division is the following function:
...
0
votes
0answers
20 views
Maxima: Check if expression contains arbitrary integration constant
I am dealing with an application in e-Learning (STACK-Plugin on Moodle). Given a simple term, students are asked to find the antiderivative (indefinite). Maxima shall check if the answer is correct.
...
-2
votes
5answers
94 views
finding count of minima or maxima in a set of numbers
The user inputs n number of datas to be followed in the next line and
then it inputs n numbers a1,a2,...,an. These numbers are heights of a
some mountains. The set of these numbers is "ACCEPTABLE" ...
1
vote
1answer
18 views
How can I configure Maxima to index lists from 0 instead of 1?
If I create a list in Maxima:
(%i1) a: [2, 3, 5, 7, 11];
(a) [2, 3, 5, 7, 11]
Then if I index into that list and ask for element 4:
(%i2) a[4];
(%o2) 7
This shows that Maxima uses 1-indexing ...
2
votes
1answer
31 views
Analog of Maple “unapply” or Mathematica “Function” in Maxima
In Wolfram Mathematica we can define an operator acting on a function (i.e. function that returns function) e.g. as for the operator of multiplication by the first argument acting on a functions of ...
2
votes
1answer
63 views
wxMaxima: matrix of matrices, vector of vectors, and “.” operator
I am studying quarks, SU(3), operators, and all that stuff used in particle physics. I want to automate the boring calculus using wxMaxima. I have successfully automated everything in the space of ...
1
vote
1answer
22 views
differentiation dependencies
I want to understand how dependencies in Maxima for differentiation work
for iterated cases.
I tried here:
(%i1) depends([f],[x,y]);
(%o1) [f(x,y)]
(%i2) depends([g],[x,y]);
(%o2) [g(x,y)...
1
vote
1answer
46 views
Maxima: How can I get a variable as the sum of the function of other variables from a system of equations?
The problem is this; I have a system of equations, which describes the workings of a system. (In this case, an electronic system.) The system has inner variables, as well as input and output variables....
0
votes
1answer
68 views
How to add double subscript to a symbolic variable?
How can I add a double subscript (add a subscript to the subscript) to a variable, when I try to type it in to the Maxima Computer Algebra System?
So for example, I would like to have variables named ...
2
votes
1answer
91 views
Maxima: How to add superscript to a symbolic variable?
How can I add a superscript to a variable, when I try to type it in to the Maxima Computer Algebra System?
So for example, I would like to have variables named U^(AC), U^(DC) where my intention is ...
0
votes
0answers
37 views
How to improve the getting of a derivative by the chain method with wx maxima?
if we want derivate by the chain rule this equation:
y=(4*x²-2*x+5)³
we have:
dy/dx = dy/du * du/dx
dy/du = 3*(4*x²-2*x+5)²
du/dx = 8*x-2
dy/du = 3*(8*x-2)*(4*x²-2*x+5)²
then I run this code in ...
2
votes
2answers
81 views
How to pass common-lisp' local variable to maxima?
I am using maxima inside SBCL and I want to do the following-simple demo for real time plotting without pause/delay-:
(loop for j from 1 below 10 do
#$plot2d(sin(x),[x,0,?j*%pi])$)
error:...
1
vote
0answers
35 views
Maxima simplifies 4*2^x to 2^(x+2) can I disable this simplification?
Maxima simplifies 4*2^x to 2^(x+2) can I somehow disable this simplification?
1
vote
1answer
31 views
How can I pass a list of multiple anonymous functions to plot2d?
I am using maxima.
I'd like to get plot2d of more than one anonymous function, but I do not know how to do it.
I would like to know how to dynamically generate functions like taylor ().
For that, I ...