Kitonum

21455 Reputation

26 Badges

17 years, 47 days

MaplePrimes Activity


These are answers submitted by Kitonum

One intermediate step:

C1 := sqrt(r+1)*sqrt(1/(r-1)); C2 := -sqrt(r^2-1)/(r-1);
C11:=combine(C1) assuming r+1>0;
is(C11=C2) assuming r<1, r>0;

                         

 

 

Your matrix  F  is only defined for values on the main diagonal and below. You can define its values above the main one as you like. For example, the code below defines a skew-symmetric matrix:

restart;
for i to 6 do
for j to i do
F[i, j] :=  g(i+1)/g(j);
 end do:
end do:
F:=Matrix(6,6,(i,j)->`if`(i>=j,F[i,j],-F[j,i]));

 

If I understand your question correctly, here are two simple ways:

restart;
interface(rtablesize=infinity):
Matrix([seq([i,ithprime(i)], i=1..99)]);
# Or
Matrix(99,2, (i,j)->`if`(j=1,i, ithprime(i)));

 

For the calculation, we used the evenness of the function  f(k)=(-1)^k/k * sin(k*x) , the value at zero  k=0  calculated  through the limit, and also used the assumption (assuming real)  for the parameter  x :

restart;
Sum((-1)^k/k * sin(k*x), k=-infinity..infinity)=limit((-1)^k/k * sin(k*x),k=0)+2*evalc(sum((-1)^k/k * sin(k*x), k=1..infinity)) assuming real;

       

 

The result obtained can be substantially simplified to a piecewise constant function (R11 in the code below). Unfortunately, Maple does not make such a complete simplification (does in the range  x=-Pi..Pi  only)  and the piecewise-function  R11  is found manually:

R:=x-2*arctan(sin(x)/(cos(x)+1));
R1:=normal(applyop(convert,[2,2,1],R, tan));
simplify(R1) assuming x>-Pi,x<Pi;
R11:=piecewise(x=(2*n-1)*Pi,(2*n-1)*Pi,x>-Pi+2*Pi*n and x<Pi+2*Pi*n,2*Pi*n); # assuming n::integer
plots:-display(plot(R, x=-5*Pi+0.01..5*Pi, color=red, thickness=2, discont),plot([seq([(2*n-1)*Pi,(2*n-1)*Pi],n=-2..2)],style=point, symbol=solidcircle, color=red), scaling=constrained);

                    

             

Matrix([["A", "B"], ["C", "D"]]);
# Or
<"A","B"; "C","D">;

 

If you want some graph to remain unchanged, then simply give the new graph a new name using the  inplace=false  option:

with(GraphTheory):
H := CompleteGraph(4);
G:=DeleteEdge(H, {1, 2},inplace=false);
DrawGraph(H);
DrawGraph(G);

 

restart

with(student)

with(PDEtools)

inf := 10^(-2)

mu := exp(-lambda*theta(y, t))

``

equ1 := R*(diff(w(y, t), t)) = mu*(diff(w(y, t), `$`(y, 2)))+(diff(mu, y))*(diff(w(y, t), y))-M*w(y, t)+L+Gr*theta(y, t)

R*(diff(w(y, t), t)) = exp(-lambda*theta(y, t))*(diff(diff(w(y, t), y), y))-lambda*(diff(theta(y, t), y))*exp(-lambda*theta(y, t))*(diff(w(y, t), y))-M*w(y, t)+L+Gr*theta(y, t)

(1)

equ2 := R*Pr*(diff(theta(y, t), t)) = diff(theta(y, t), `$`(y, 2))+Br*mu*(diff(w(y, t), y))^2+Ra*((theta(y, t)+1)^4-1)

R*Pr*(diff(theta(y, t), t)) = diff(diff(theta(y, t), y), y)+Br*exp(-lambda*theta(y, t))*(diff(w(y, t), y))^2+Ra*((theta(y, t)+1)^4-1)

(2)

parameters := [Gr = 1, Pr = 7.1, R = .5, lambda = .5, Bi = 1, M = .5, Ra = .1, L = 1, Br = .1]

IBC := [w(y, 0) = 0, theta(y, 0) = 0, (D[1](w))(0, t) = 0, (D[1](theta))(0, t) = 0, w(inf, t) = 0, (D[1](theta))(inf, t)+Bi*theta(inf, t) = 0]

[w(y, 0) = 0, theta(y, 0) = 0, (D[1](w))(0, t) = 0, (D[1](theta))(0, t) = 0, w(1/100, t) = 0, (D[1](theta))(1/100, t)+Bi*theta(1/100, t) = 0]

(3)

pds := pdsolve({subs(parameters, equ1), subs(parameters, equ2)}, {subs(parameters, IBC)[]}, numeric, time = t, range = 0 .. 10^(-2))

_m1761663908192

(4)

 

Download PDE_solution_new.mw

This is not so easy to do due to the way Maple works with numbers in the  float  format. First we convert  0.03  to an exact fraction, put it out of brackets, and at the end we do the reverse conversion:

restart;
f:=0.03-0.03*cos(5.885*t);
f1:=applyop(convert, {1,[2,1]}, f, fraction);
3/100*``(f1/(3/100));
subs(3/100=0.03,%);  # The desired result

                            

 

Probably this problem is related to your version of Maple. Everything works as expected in Maple 2018:


 

restart

with(plots)

 
   

 

 
 
 

f := proc (x) options operator, arrow; sin(100/(x+13)) end proc

proc (x) options operator, arrow; sin(100/(x+13)) end proc

(2.1.1)

g := proc (x) options operator, arrow; 10/(10*x+3) end proc

proc (x) options operator, arrow; 10/(10*x+3) end proc

(2.1.2)

gr_f := plot(f(x), x = 0 .. 30, y = -2 .. 2, legend = "f", font = [times, normal, 6], legendstyle = [font = [times, normal, 6]], labelfont = [times, normal, 6])

gr_g := plot(g(x), x = 0 .. 30, y = -2 .. 2, legend = "g", color = blue, font = [times, normal, 6], legendstyle = [font = [times, normal, 6]], labelfont = [times, normal, 6])

display(gr_f, gr_g)

 

 

 

A := fsolve(f(x) = g(x), x = 1.1)

1.049742001

(2.2.1)

B := fsolve(f(x) = g(x), x = 1.7)

1.676209051

(2.2.2)

C := fsolve(f(x) = g(x), x = 20)

19.35519742

(2.2.3)

 

 

assume(E > C)

solve(int(f(x)-g(x), x = C .. E) = 3, E, UseAssumptions)

28.05987548

(2.3.1)

fsolve(int(f(x)-g(x), x = C .. E) = 3, E)

12.00027508

(2.3.2)

fsolve(int(f(x)-g(x), x = C .. E) = 3, E = 30)

28.05987548

(2.3.3)

 

La valeur de E cherchée est donc d'environ 28,06 unités.


 

Download Problem_of_integral_new.mw

Obviously, if  |z - 6*I| = 3  then  all such points  z  lie on the circle with center at the point  [0, 6]  and radius :

restart;
z:=3*cos(t)+(3*sin(t)+6)*I; 
minimize(argument(evalc(z)), t=0..2*Pi, location);
eval(z, %[2,1,1][]);  # The answer

                             

restart;
n:=4:
combinat:-permute([1$n,-1$n],n);

     [[1, 1, 1, 1], [1, 1, 1, -1], [1, 1, -1, 1], [1, 1, -1, -1], [1, -1, 1, 1], [1, -1, 1, -1], [1, -1, -1, 1], [1, -1, -1, -1], [-1, 1, 1, 1], [-1, 1, 1, -1], [-1, 1, -1, 1], [-1, 1, -1, -1], [-1, -1, 1, 1], [-1, -1, 1, -1], [-1, -1, -1, 1], [-1, -1, -1, -1]]                  

Try the following simple code:

restart;
a:=a+1;


You will probably get the same error. So deal with your last assignments.

Try the following simple code:

restart;
a:=a+1;


You will probably get the same error. So deal with your last assignments.

It's easier to do this using the  plots:-inequal  command:

restart;
A:=plot(1/x, x=0..3, 0..3, thickness=2):
B:=plots:-inequal({x>=0,x<=1}, x=0..3,y=0..3, optionsfeasible = [color = "LightBlue"]):
plots:-display(A,B);

                 

 

`%+`(seq((-1)^(n + 1)/(2*n - 1), n = 1 .. 4));

                                

                   

First 24 25 26 27 28 29 30 Last Page 26 of 290