vv

12453 Reputation

19 Badges

9 years, 280 days

MaplePrimes Activity


These are answers submitted by vv

restart;

f := arcsin(x)/(1+(-x^2+1)^(1/2));

arcsin(x)/(1+(-x^2+1)^(1/2))

(1)

int(f,x);

Error, (in Utils:-TransformAndApply) numeric exception: division by zero

 

f1:=rationalize(f);

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

(2)

J:=Int(f1,x)

Int(-(-1+(-x^2+1)^(1/2))*arcsin(x)/x^2, x)

(3)

#map(rationalize,J);

F:=value(%);

(1/2)*arcsin(x)^2+(2*I)*arcsin(x)-(-(-x^2+1)^(1/2)+1+I*x)*arcsin(x)/x-2*ln(I*x+(-x^2+1)^(1/2)+1)

(4)

simplify(diff(F,x)-f);

0

(5)

plot(F,x=-1..1);

 

 

IntegrationTools:-Change(J, arcsin(x)=t);

Int(-(-1+(-sin(t)^2+1)^(1/2))*t*cos(t)/sin(t)^2, t)

(6)

simplify(%) assuming t<Pi/2,t>-Pi/2;

Int(t*cos(t)/(cos(t)+1), t)

(7)

value(%);

(1/2)*t^2-t*tan((1/2)*t)+ln(1+tan((1/2)*t)^2)

(8)

F1:=eval(%, t=arcsin(x));

(1/2)*arcsin(x)^2-arcsin(x)*tan((1/2)*arcsin(x))+ln(1+tan((1/2)*arcsin(x))^2)

(9)

simplify(diff(F1,x)-f);

0

(10)

F2:=eval(F1,tan = (u -> sin(2*u)/(1+cos(2*u))));

(1/2)*arcsin(x)^2-arcsin(x)*x/(1+(-x^2+1)^(1/2))+ln(1+x^2/(1+(-x^2+1)^(1/2))^2)

(11)

simplify(diff(F2,x)-f);

0

(12)

 

 

 

MROUND := (x,m) -> round(x/m)*m;

(m can be noninteger)

Here is a more general and robust (I think) procedure. I borrowed from mmcdara the examples and the idea to consider only rational functions.

restart;

C3:=proc(f::ratpoly, x, {plot::truefalse:=false})
  local p,q,a,b,c,r2,r1, sol,solnum, circ := (x-p)^2+(y-q)^2-r2,
        fn:=(u -> fnormal(evalf(u),Digits,Float(1,-Digits+3)));
  numer(eval(circ, y=f));
  rem(%, (x-a)^2*(x-b)^2*(x-c)^2, x);
  solve([coeffs(%,x)], [a,b,c,p,q,r2], explicit);
  select(u -> ( fn(eval(a,u))<fn(eval(b,u)) and fn(eval(b,u))<fn(eval(c,u)) ), %);
  sol:=map(rhs~,%); #a, b, c, p, q, r2  
  if not type(sol,list) or sol=[] then return "No solution!" fi;
  solnum:=simplify(map(fn, sol[1]), zero);
  if plot then
    a, b, c, p, q, r2 := solnum[]; r1:=sqrt(r2);
    print(plots:-display(
     :-plot(f, x=a-1..c+1, view=q-r1-1..q+r1+1,color=red, discont),
     :-plot([p+r1*cos(t), q+r1*sin(t), t=0..2*Pi]), scaling=constrained));
  fi;
  sol, solnum  
end proc:

C3(1/(x^2-2*x), x, plot);

 

[[1-2^(1/2), 1, 1+2^(1/2), 1, 1/2, 9/4]], [-.414213562, 1., 2.414213562, 1., .5000000000, 2.250000000]

(1)

C3((1/2)*(2+x)/(x*(x+1)), x, plot);

 

[[-(1/6)*(-2*(46+(6*I)*237^(1/2))^(2/3)-(3*I)*237^(1/2)+(22*(46+(6*I)*237^(1/2))^(4/3)+(66*I)*(46+(6*I)*237^(1/2))^(1/3)*237^(1/2)-363*(46+(6*I)*237^(1/2))^(2/3)-(414*I)*237^(1/2)+506*(46+(6*I)*237^(1/2))^(1/3)+4812)^(1/2)-11*(46+(6*I)*237^(1/2))^(1/3)-23)/(46+(6*I)*237^(1/2))^(2/3)-(1/6)*(46+(6*I)*237^(1/2))^(1/3)-(11/3)/(46+(6*I)*237^(1/2))^(1/3)-2/3, (1/6)*(-2*(46+(6*I)*237^(1/2))^(2/3)-(3*I)*237^(1/2)+(22*(46+(6*I)*237^(1/2))^(4/3)+(66*I)*(46+(6*I)*237^(1/2))^(1/3)*237^(1/2)-363*(46+(6*I)*237^(1/2))^(2/3)-(414*I)*237^(1/2)+506*(46+(6*I)*237^(1/2))^(1/3)+4812)^(1/2)-11*(46+(6*I)*237^(1/2))^(1/3)-23)/(46+(6*I)*237^(1/2))^(2/3), (1/6)*(46+(6*I)*237^(1/2))^(1/3)+(11/3)/(46+(6*I)*237^(1/2))^(1/3)-1/3, 0, -1, 4]], [-1.551387524, -.5731827454, 1.124570270, 0., -1., 4.]

(2)

C3(-(1/2)*(3*x+1)/(x*(x+3)), x, plot);

 

[[-10/3-(1/6)*(-184+(2*I)*10058^(1/2))^(1/3)-7/(-184+(2*I)*10058^(1/2))^(1/3)+(1/6)*(I*10058^(1/2)+10*(-184+(2*I)*10058^(1/2))^(2/3)-(4782+42*(-184+(2*I)*10058^(1/2))^(4/3)+(42*I)*(-184+(2*I)*10058^(1/2))^(1/3)*10058^(1/2)+(552*I)*10058^(1/2)-1323*(-184+(2*I)*10058^(1/2))^(2/3)-3864*(-184+(2*I)*10058^(1/2))^(1/3))^(1/2)+21*(-184+(2*I)*10058^(1/2))^(1/3)-92)/(-184+(2*I)*10058^(1/2))^(2/3), -(1/6)*(I*10058^(1/2)+10*(-184+(2*I)*10058^(1/2))^(2/3)-(4782+42*(-184+(2*I)*10058^(1/2))^(4/3)+(42*I)*(-184+(2*I)*10058^(1/2))^(1/3)*10058^(1/2)+(552*I)*10058^(1/2)-1323*(-184+(2*I)*10058^(1/2))^(2/3)-3864*(-184+(2*I)*10058^(1/2))^(1/3))^(1/2)+21*(-184+(2*I)*10058^(1/2))^(1/3)-92)/(-184+(2*I)*10058^(1/2))^(2/3), (1/6)*(-184+(2*I)*10058^(1/2))^(1/3)+7/(-184+(2*I)*10058^(1/2))^(1/3)-5/3, -2, 10/9, 289/81]], [-3.745060582, -1.137576607, -.117362812, -2., 1.111111111, 3.567901235]

(3)

C3(x/(x^2+1), x);

"No solution!"

(4)

 


Download c3.mw

(mapleprimes does not render all the output)

restart;
f:=x->1/(x^2-2*x):
P:=plot(f, -4..4, color=red, discont, view=-4..4, scaling=constrained):
#normal at (a, f(a));
y - f(a) + 1/D(f)(a)*(x-a):
# center of the circle is (1,b)
b:=solve(eval(%, x=1), y):
(b-f(1))^2 = (1-a)^2 + (b-f(a))^2:
A:=select(u->is(u>2), {solve(%)}):
for a1 in A do
  b1:= simplify(eval(b, a=a1)); r1:=abs(b1-f(1));
  Q:=plot( [1+r1*cos(t), b1+r1*sin(t), t=0..2*Pi]):
  print( plots:-display(P,Q, title=typeset(Center=[1,b1],`, r`=r1)) );
od:

You can make a "custom lightmodel" using color

restart;
g:=exp(-x^2-y^2):
grad:=[diff(g,x),diff(g,y),-1]:
grad:=-grad/~sqrt(add(grad^~2)):
light:=[-1/sqrt(3),-1/sqrt(3),1/sqrt(3)]:
c:=add(grad*~light):
LED := plot3d(<3 + cos(t)*cos(s), cos(t)*sin(s), sin(t)>, s = 0..2*Pi, t =-Pi/2..Pi/2, 
              color = "Yellow", style=surface, lightmodel = none):
plots:-display(LED, plot3d(g, x=-2..2, y=-2..2, color=[1,1,c, colortype=HSV], style=surface),scaling=constrained);

subs does not evaluate. If you use

Cq:= proc(x,y)
  evalb(x=eval(y,{q2=q1,q1=q2}))
end proc;

everything works as expected. 

The integrals do not make much sense.
You integrate wrt RR = 0..R an indefinite integral. But the indefinite integral is determined up to an (additive) unknown constant.
So, the final result will be also up to a constant, hence it is useless.

You have the derivative of a function (defined by a piecewise expression) at the point t=0 (not an equation!).
The function is not derivable at this point because it is not correctly defined for t<0  (ln(0)).
You probably want the right-derivative, but Maple has only two-sided derivatives.
(It can be computed as a right-limit if you want, or simply remove the first branch in piecewise).
 

It actually works. I added the list type and set the base b to 10.

restart
`&*` := proc(A::list, B::list, b := 10, d := 4) 
    local i, k, c := 0; 
    [seq(irem(c + add(A[i]*B[k+1-i], i = 1 .. k), b, 'c'), k = 1 .. d)]
 end proc:
[4,3,2,1] &* [5,4,3,2]
#                          [0, 3, 7, 3]

1234*2345 mod 10^4;   # check
#                              3730

 

Motto: "In mathematics you don't understand things. You just get used to them" (John von Neumann).

A mathematician has an "abstract mind" so that in order to "see" R^13, he considers R^n and then takes n=13.
(This seems to be a joke, but basically it is not.)

Coming back more seriously to your example, observe first that in an abstract mathematical context such as Measure Theory,
Maple cannot help much. The visualization of a countable union of nested intervals should have been met in a Calculus course.

Anyway, in an abstract sigma-algebra, a visualization is out of the question; all we can do is to try special cases e.g. taking the space as finite, R, or R^2.

For the proof of the theorem 2.1 it is essentially enough to use the equivalence: 
sigma(A) = sigma(B)  iff  A subset sigma(B) and B subset sigma(A).

Visualizations are very seldom possible. Take for instance the proofs of the theorems:
1. Any Borel set is Lebesgue measurable.
2. There are subsets in R which are not Borel
(based on cardinality or on a Vitali-type construction).

restart;
JointNum := 3;                   
assign( seq(evaln(alpha[i]), i = 1 .. JointNum) = (0, 0, 0) );

If alpha is free (not assigned) then evaln can be omitted.

You cannot compute the indefinite integral numerically. Use:

seq(int(fN(x, 1.2), x=0..X), X=0..1,0.1);
0., 0.03008394009, 0.05955125696, 0.08778683199, 0.1141785882,   0.1381190848, 0.1590071982, 0.1762499145, 0.1892642546,  0.1974793487, 0.2003386758


 

The proof of the theorem: In a quadrilateral circumscribed to an ellipse, the line passing through the middle of the diagonals passes through the centre of the ellipse.
It is enough to have a circle instead of an ellipse (just take a projection). So, the proof:

restart;
x*cos(alpha[i])+y*sin(alpha[i])-1, x*cos(alpha[j])+y*sin(alpha[j])-1:
T:=unapply( eval([x,y], solve({%},[x,y])[]), [i,j]): # intersection for two tangents;
Slope:= P -> P[2]/P[1]:                              # the slope of the line OP
simplify( Slope((T(1,2)+T(3,4))/2) - Slope((T(1,3)+T(2,4))/2) );

        0

q.e.d.

msolve(5*x=7, 16);

                     {x = 11}

 

 w:=(x,y) -> (x^2 - y^2, 2*x*y)

proc (x, y) options operator, arrow; x^2-y^2, 2*x*y end proc

(1)

expform:=proc(w::procedure, t::name:=t_)
  local L:=w((Re,Im)(exp(2*Pi*I*t)));
  convert(L[1]+I*L[2],exp) assuming t::real
end:

expform(w, t);

exp((4*I)*Pi*t)

(2)

W:=unapply(%,t);

proc (t) options operator, arrow; exp((4*I)*Pi*t) end proc

(3)

expform((x,y)->(-y,x), t);

I*exp((2*I)*Pi*t)

(4)

exp(simplify(ln(%), symbolic)); #optional

exp(((1/2)*I)*Pi*(1+4*t))

(5)

 

First 17 18 19 20 21 22 23 Last Page 19 of 111