Kitonum

21530 Reputation

26 Badges

17 years, 94 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart;
Set:={R = 7.339698158, S = 2.378491488, W = 2.512047349}:
X:=eval(R, Set);
Y:=eval(S, Set); 
#  and so on

You can do this in one line (multiple assignment):
restart;
Set:={R = 7.339698158, S = 2.378491488, W = 2.512047349}:
X, Y:=eval([R, S], Set)[];

 

Edit.

I think that in one answer it is easy to answer for everyone:

1. Student:-Calculus1:-LimitTutor command is very weak and just fails with this example.

2. For a student studying the theory of limits, it would be more useful to solve this example manually, first getting rid of the signs of the modules in the neighborhood of point  x=2  on the left and on the right.

3. The process of getting rid of modules is easy to automate with the help of Maple, after which the task becomes quite obvious:

Expr:=(2*abs(x-2)+abs(x+1)-3)/(abs(x^2-4)+x-2);  
A:=simplify(Expr) assuming x<2 and x>1.9;  
# On the left
B:=simplify(Expr) assuming x>2 and x<2.1;  # On the right
plot(Expr, x=1..3, view=0..1, discont, size=[600,300]);  # A visualization
                        

 

restart;
SplitChange := proc(str::string) 
local start, i, len, k, L;  
start := 1; len := length(str); k:=0;
for i from 2 to len do 
if str[i] <> str[start] then k:=k+1; L[k]:=str[start .. i-1]; start := i end if;
end do;
L[k+1]:=str[start..len]; 
convert(L, list);
end proc:

Example of use:
SplitChange("WPKCPYWYYYXHYY");
                
["W", "P", "K", "C", "P", "Y", "W", "YYY", "X", "H", "YY"]


Edit.

A  and  B  are 2 curves on the surface  C :

restart; 
f:=(x,y)->2*x^2+3^2-x*y-4:
A:=plots:-spacecurve([1,y,f(1,y)], y=-2..2, color=red, thickness=3):
B:=plots:-spacecurve([x,1,f(x,1)], x=-2..2, color=blue, thickness=3):
C:=plot3d(f, -2..2, -2..2, style=surface):
plots:-display(A,B,C, orientation=[115,75], labels=[x,y,z]);

For this particular plotting, 20 digits is enough. It is better not to specify the global Digits, but to specify the desired accuracy when specifying the function itself. In this case, you need a procedural form for plotting:

restart;
f:= x->evalf[20](exp(x)*HeunC(2*x, 1/2, -1/2, -x^2, 1/8, 99/100)):
plot(f, 0..40);
                          

 

restart; 
a := plot(1/x, x=0..1);
op([3,2], a);   
# This is the desired result
 

Should be  od  (instead of  end )  in the end of your code.

You wrote "does computing H(n) for n greater than 10^16 give  any information about the series" . The convergence or divergence of the series is related to the behavior of this series at n->infinity. Therefore, without this study, computations with any accuracy of a finite number of terms of the series do not give an exact answer to the question of its convergence.

See help on  size  option for  plot  command.

Example:
plot(sin(x), x=-Pi..Pi, size=[800,300]);
plot(cos(x), x=-Pi..Pi, size=[800,300]);

If you need to enumerate in this long list in a for-loop, you do not have to first generate the list itself. You can do this dynamically using the following commands: combinat[nextperm], combinat[prevperm], combinat[firstperm] and combinat[lastperm]
 

Here is a simple way (it works in Maple 2018.1):

restart;
with(Grading):
Quiz("What is the sum", proc(Resp, Ans) evalb(value(Ans) = Resp) end proc, proc() local r1,r2; r1 := rand(1 .. 20)(); r2 := rand(1 .. 20)(); r1%+r2 end proc);

 

restart;
Eq1:=x+2*y+3*z=9:
Eq2:=4*x+y+5*z=29:
Eq3:=2*x+2*y+5*z=21:
solve([Eq1,Eq2,Eq3], [x,y,z]);
eval(2*x+3*y+z, %[ ]);


Below is another way:

restart;
Eq1:=x+2*y+3*z=9:
Eq2:=4*x+y+5*z=29:
Eq3:=2*x+2*y+5*z=21:
solve([Eq1,Eq2,Eq3, A=2*x+3*y+z], [A,x,y,z]);

 

Another method that is commonly used for manual calculation is to multiply and divide your fraction by the sum of the roots in the numerator:


 

restart

f := proc (x) options operator, arrow; sqrt(2*x+1) end proc

proc (x) options operator, arrow; sqrt(2*x+1) end proc

(1)

A := (f(x+h)-f(x))/h

((2*x+2*h+1)^(1/2)-(2*x+1)^(1/2))/h

(2)

B := expand(numer(A)*(f(x+h)+f(x)))/(denom(A)*(f(x+h)+f(x)))

2/((2*x+2*h+1)^(1/2)+(2*x+1)^(1/2))

(3)

eval(B, h = 0)

1/(2*x+1)^(1/2)

(4)

diff(f(x), x)

1/(2*x+1)^(1/2)

(5)

``


 

Download rationalize_new.mw

Here is another solution:

restart;
N:=100:
L:=NumberTheory:-Divisors(N);
add(a(k), k=L);
                                
L := {1, 2, 4, 5, 10, 20, 25, 50, 100}
         a(1) + a(2) + a(4) + a(5) + a(10) + a(20) + a(25) + a(50) + a(100)


I think for large  N  this will be more effective than the method above.

1. If we expand  cosh(x)  in the power series, then we see that all the coefficients of the series are positive numbers and  x  has even exponents:

series(cosh(x), x=0, 10);
     
1+(1/2)*x^2+(1/24)*x^4+(1/720)*x^6+(1/40320)*x^8+O(x^10)

Therefore, it is easy to obtain an entire chain of inequalities  (in real domain):
cosh(x) >= 1+(1/2)*x^2 ,   cosh(x) >= 1+(1/2)*x^2+(1/24)*x^4   and so on.

2. Since for any real  x  this is obvious that  abs(cosh(x))=cosh(x) , all the above inequalities are also hold for  abs(cosh(x)) , for example  abs(cosh(x)) <= exp(x^2/2)  and so on.

First 108 109 110 111 112 113 114 Last Page 110 of 290