Kitonum

21977 Reputation

26 Badges

18 years, 47 days

MaplePrimes Activity


These are answers submitted by Kitonum

Here is another method based on applying  extrema  command and simplifying the result by  rationalize  and  simplify  commands:

restart;
f:=x->(cos(x)+sqrt(3)*sin(x))/(cos(x)+sin(x)+2);
convert(extrema(f(x), {}, x), list);
Min, Max:=simplify(rationalize(%))[];
evalf([Min,Max]);

Output:

    

 

 

You assigned  o8:=0  and  o8  stands in the denominators.

In Maple 2018 everything is the same.
Do not use  simplify  command, but just differentiate:

with(Physics):
Setup(noncommutativeprefix={P,Q});
diff(Q(t)^2*P(t)*Q(t) + Q(t)*P(t)*Q(t)^2, t);

Output:

          

Replace  e^(c*v)  by  exp(c*v) . e  is just a symbol in Maple.

This works:

restart:
with(Statistics): 
X := Vector([1, 2, 3, 4, 5, 6], datatype = float):
Y := Vector([2.2, 3, 4.8, 10.2, 24.5, 75.0], datatype = float): 
NonlinearFit(a+b*v+exp(c*v), X, Y, v);

sqrt(sqrt(p^2+1)-1)*sqrt(sqrt(p^2+1)+1);
simplify(combine(%)) assuming positive;


Here is another rather effective method of simplifying expressions containing radicals. Since this expression itself (we denote it by  ) is obviously positive for any real  p , it is equal to the square root of its square   A=sqrt(A^2) . Therefore, we first square it, then simplify and extract the square root:

A:=sqrt(sqrt(p^2+1)-1)*sqrt(sqrt(p^2+1)+1);
sqrt(simplify(A^2))  assuming p>0;
                         

  Edit.  

If you define a matrix or an array, you should specify ranges for the indexes and just specify non-zero elements. The rest of the elements are automatically considered zeros. 

Your example:

H:=Array((1..3)$4, {(1,1,1,1)= value1, (1,2,2,1) = value2, ...});


See help on  Matrix  and  Array  commands for details.

expr:=``(-y^2+1);
abs(expr);
expand(op(1,%));

restart;
expr := 7*ln(arcsin(x))-(1/2)*ln(x-1)*sin(x)-(1/2)*ln(x+1)+f;
applyrule(ln(t::anything)=ln(abs(t)), expr);


Addition.  Such a calculation may cause a problem due to premature calculation. In this case, you can act as in the example below:

restart;
expr := ''7*ln(arcsin(x))-(1/2)*ln(x-1)*sin(x)-(1/2)*ln(x+1)+f+ln(-2)+ln(-exp(1))'';
applyrule(ln(t::anything)=ln(abs(t)), expr);

Should be  plots:-display  instead of  plot:-display  or  display .  Also should be  plottools:-line  instead of  line .Also  sigma1P1sigma2P1tau12P1  are not defined. Submit the complete code if you want a more complete answer.

See:
L[1]:=1:  L[2]:=2:
L; 
                                 
              L

Unfortunately in Maple there is no command that allows to find the set of values of some function (from one or several variables). But there is a rather simple workaround. Using  maximize  and  minimize  commands, we can solve the problem. It remains to apply the property of a continuous function defined on a connected and compact set: if at two points  x1  and  x2  the function takes certain values  m  and  M  (M>m), then for any intermediate number  m<c<M  there is a point  x0  at which the function takes the value  c .

For the function  (R,z)->R-sqrt(R^2+z^2)  we have:

maximize(R-sqrt(R^2+z^2));
minimize(R-sqrt(R^2+z^2));
                                                       
 0
                                                     -infinity


Therefore, we can conclude that a given function can take any values <=0 .

 


 

restart

VectorCalculus[SetCoordinates]('cartesian'[x, y, z]); F := x, y, z, t

vel := VectorCalculus[VectorField](`<,>`(u(F), v(F), w(F))); V := VectorCalculus[VectorField](rho(F)*vel)

Vector(3, {(1) = u(x, y, z, t), (2) = v(x, y, z, t), (3) = w(x, y, z, t)})

 

Vector(3, {(1) = rho(x, y, z, t)*u(x, y, z, t), (2) = rho(x, y, z, t)*v(x, y, z, t), (3) = rho(x, y, z, t)*w(x, y, z, t)})

(1)

Mass_eqn := diff(rho(F), t)+VectorCalculus[Divergence](V)

diff(rho(x, y, z, t), t)+(diff(rho(x, y, z, t), x))*u(x, y, z, t)+rho(x, y, z, t)*(diff(u(x, y, z, t), x))+(diff(rho(x, y, z, t), y))*v(x, y, z, t)+rho(x, y, z, t)*(diff(v(x, y, z, t), y))+(diff(rho(x, y, z, t), z))*w(x, y, z, t)+rho(x, y, z, t)*(diff(w(x, y, z, t), z))

(2)

``


 

Download aero_new.mw

Here is a procedure that does the desired for both constant complex numbers and numbers containing parameters, assuming that these parameters are real numbers. To find the polar angle, the built-in two-argument function arctan(b,a)  was used. This function returns the polar angle for the point  (a,b)  in the range  -Pi .. Pi:

restart;
ExponentialForm:=proc(z)
local Z, a, b;
Z:=evalc(z);
a,b:=Re(Z),Im(Z) assuming real; 
``(simplify(sqrt(a^2+b^2)))*exp(``(simplify(arctan(b,a)))*I) assuming real;
end proc:


Examples of use:

ExponentialForm(1+1*I);
ExponentialForm(1-sqrt(2));
ExponentialForm(exp(I*3*x-x/2)/(1+I));
                      
   

Here is another version of the same procedure in which the multiplication symbol is explicitly displayed as a bold dot: 

ExponentialForm1:=proc(z)
local Z, a, b, c;
Z:=evalc(z);
a,b:=Re(Z),Im(Z) assuming real; 
subs(`%*`=`.`,simplify(sqrt(a^2+b^2))%*exp(simplify(arctan(b,a))%*I)) assuming real;
end proc:


Example:

ExponentialForm1((1+I)^37);
expand(%);
       


Edit. 

It's just the length of the gradient vector of a scalar function  u(x,y) . Formally, this can be calculated using Student:-VectorCalculus package:

with(Student:-VectorCalculus):
V:=Del(u(x,y));
a:=DotProduct(V,V);
n:=V/sqrt(a);
simplify(DotProduct(n,V));


Addition. For calculation at a specific point it is convenient to use the differentiation operator  D .

Example:
restart;
u:=(x,y)->x^2+y^2;
x0:=1: y0:=2:
sqrt(D[1](u)(x0,y0)^2+D[2](u)(x0,y0)^2);


 

In addition to the unknown  S , your equation contains 2 parameters  epsilon  and  a . To solve the equation, you must specify numerical values for these parameters.

Example:


 

restart; Eq := -3*Pi^2*3^(2/3)*4^(1/3)*S^3*(epsilon/Pi)^(2/3)+16*a*(S/Pi)^(3/2)*Pi^5+24*S^4*Pi = 0; Student:-Calculus1:-Roots(eval(lhs(Eq), [epsilon = 1, a = -2]), S); plot(eval(lhs(Eq), [epsilon = 1, a = -2]), S = 0 .. 5)

-3*Pi^2*3^(2/3)*4^(1/3)*S^3*(epsilon/Pi)^(2/3)+16*a*(S/Pi)^(3/2)*Pi^5+24*S^4*Pi = 0

 

Warning, some roots are returned as numeric approximations

 

[0, 3.779233961]

 

 

 


 

Download rootof_new.mw

I can not confirm this result. Everything is working properly on my computer (Maple 2018 on Windows 10):

restart;
g:=x->int(exp(-2*t^2), t=x-1..x)-int(exp(-2*t^2), t=x..x+1);
g(1);
evalf(%);
G:=x->Int(exp(-2*t^2), t=x-1..x)-Int(exp(-2*t^2), t=x..x+1);
evalf(G(1));
                           

First 119 120 121 122 123 124 125 Last Page 121 of 293