Kitonum

21580 Reputation

26 Badges

17 years, 152 days

MaplePrimes Activity


These are answers submitted by Kitonum

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));

                                

                   

Here is the fragment from the help  ?plot,structure :

"GRID(a..b, c..d, A)
The GRID structure represents surfaces in 3-D space defined by a uniform sampling over a rectangular (aligned) region of the plane.  The GRID structure takes the form GRID(a..b, c..d, A) where a..b is the x-range, c..d is the y-range, and A is a two-dimensional Array.  If you have an m-by-n grid, then element A[i, j] is the function value at grid point (i, j), for i in 1..m and j in 1..n.  The Array A may be replaced by a list of the form [[z11,...z1n], [z21,...z2n],...[zm1...zmn]] where zij is the function value at grid point (i, j)."

(i, j) are not values of x and y, but indexes for function z values. In your example i=1..4, j=1..3

Here are two simple steps to get the desired simplification. We take the second step only if we are not satisfied with the first one:

simplify(evalc(w)); # The first step
numer(%)/expand(denom(%)); # The second step

                                         


You've spent a lot of time looking for a one-line code. You could use it to do more useful things.

The standard way is to use the  piecewise command:

restart;
f:=piecewise(x<0,1/x, x>=0,sqrt(x));
plot(f, x=-4..4, -4..2, scaling=constrained, discont);
First 25 26 27 28 29 30 31 Last Page 27 of 290