Kitonum

21445 Reputation

26 Badges

17 years, 46 days

MaplePrimes Activity


These are answers submitted by Kitonum

Instead of   i, j -> ...   should be   (i, j) -> ...   (parentheses are missed)

See corrected file:

h_2.5_eq4_new.mw

XY:=[[1,2.58], [3,8.57], [5,15.00], [10,30.10], [15,45.00]]:
CurveFitting:-LeastSquares(XY, x);
plot([XY, %], x=0..16, style=[point,line], symbolsize=15);

                         

1. For exact solution of a linear system use  LinearAlgebra:-LinearSolve  or  solve   command.  

2. If the system has more equations than unknowns, it is usually inconsistent, but it can be solved approximately using   LinearAlgebra:-LeastSquares  command .

3. See help on these commands.

Actually we have geometric series with  q=sin(k*x/2) :

eval(sum(q^(2*n-2), n=0..N), q=sin(k*x/2));  # Finite sum
S:=sum(q^(2*n-2), n=0..infinity) assuming abs(q)<1;  # Infinite sum
eval(S, q=sin(k*x/2));

                    

 

Edit. If the coefficients of the sum are not equal to  1 , the change  q=sin(k*x/2)   may also be useful: first, by simplifying the expression of  q , and then doing the reverse change.

 

content(4-2*a);
primpart(4-2*a);
%%*``(%);

                                             

 

A trick is needed for the second example:

P:=2*x^2 - 2*x + sqrt(2);
sqrt(2)*``(expand(P/sqrt(2)));
map(`^`,  %, 2);

                                    

 

Edit. The first example can be written shorter:

content(4-2*a, a, p)*``(p);

                                               2*(2-a)

 

Here is a solution to your problem on a simple example:

A:=Matrix([[a1*x+b1*y+c1*z],[a2*x+b2*y+c2*z],[a3*x+b3*y+c3*z]]);
LinearAlgebra:-GenerateMatrix(convert(A,list), [x,y,z])[1];
 # The desired matrix
%.<x,y,z>;  # Verification

                             

 

 

deqv := m*v(s)*(diff(v(s), s)) = m*g-k*v(s)^2;
solv := dsolve({deqv, v(0) = v0}, v(s))  assuming m>0, k>0, g>0, v0>0;

       

 

 

eval(x[1,2,1], Sol[2]);

                                                               1

I have assumed that the angle is 35 degrees (by default  in Maple angles in radians). The system has 2 solutions in the range  -Pi<=x<=Pi :

a:=35*Pi/180:
Eq1:=-sin(a)*T1+T2=0:
Eq2:=40-T1*cos(a)=0:
Eq3:=T3*sin(x)-T2=0:
Eq4:=50+cos(x)*T3=0:
Sol:=solve({Eq1,Eq2,Eq3,Eq4}, explicit);  
# Symbolic (exact) answer
evalf(Sol);  # Numerical (approximate) answer


Edit. We can slightly simplify the resulting symbolic answer  Sol  by :

simplify([Sol]);
 

 

 

I made a few corrections in the latter group.

quest1.mw

restart;
f:=y^3+x^2:
M:=maximize(f, x=0..1, y=-1..1);
A:=plot3d(f-M, x = 0 .. 1, y = -1 .. 1, style=surface, color=khaki, filled):
F:=plottools:-transform((x,y,z)->[x, y, z+M]):
plots:-display(F(A),  orientation=[45,75]);

List:=[13,16,16,29,34,33,33,12,22,26,25,25,25,11]:
ListTools[Search](25, List);  
# The position of the first number 25  in the list  List
List:=subsop(%=NULL, List);

                                              11
   [13, 16, 16, 29, 34, 33, 33, 12, 22, 26, 25, 25, 11]
 

Here is another way similar Preben's one, but shorter and without tricky commands as freeze, evalindets and etc.

restart;
sys:={u+v = a , u-v = b};
solve(sys, {u,v});
eval(%, {a=<-2,4>, b=<-3,6>});

                     

 

 


 

The problem is easily reduced to solving a system of four equations with four unknowns:

u:=<u1,u2>:  v:=<v1,v2>:
Eq1:=u+v =~ <-2,4>;  Eq2:=u-v = ~<-3,6>;
solve({Eq1[1], Eq1[2], Eq2[1], Eq2[2]});
eval([u, v], %)[ ];

                     

 

Addition. Here is a version with  Equate  command:

u:=<u1,u2>: v:=<v1,v2>:
Sys:=op~({Equate(u+v,<-2,4>), Equate(u-v,<-3,6>)});
solve(Sys);
u, v:=eval([u,v], %)[ ];


 

This is your error rather than Maple. You have entered a non-linear equation, and Maple only solves (step by step) linear equations. See Instructions below in the window of this application.

 

Addition.  See this application  http://www.universalmathsolver.com/    especially here

http://download.cnet.com/Free-Universal-Algebra-Equation-Solver/3000-2053_4-75211972.html?part=dl-&subj=dl&tag=button

First 167 168 169 170 171 172 173 Last Page 169 of 289