Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Markiyan Hirnyk  Now I write a procedure in which is displayed a repeating decimal with highlighted period. This can be done by using a line above repeating group of digits, but it is possible also by parentheses or by dots as in my question. I know how to implement the first 2 methods, but for completeness I would like to learn, and the latter method. 

@emendes  Use this modification of Carl's procedure:

MyTest:= (F::list(algebraic), V::And(list(name), satisfies(V-> nops(V)=nops(F))))->
not ormap(k-> andmap(f-> f::freeof(V[k]), [F[..k-1][], F[k+1..][]]), {$1..nops(V)}):

 

Example of use:

MyTest([x*y*theta[5]+x*theta[2], x*y*theta[15], x*theta[22]+y*theta[23]+z*theta[24]], [x,y,z]);

                                                    false

@Markiyan Hirnyk 

The original equation is reduced to the equation  tan(Pi*t) = tan(2*Pi*t^2)  by the 4 steps:
1. The second and third terms of the original equation is transported to the right.
2. On the right the term  tan(Pi*t)  is factored out.
3. Divide both sides by the difference in parentheses.
4. On the left apply the formula for the tangent of the double angle.

A further solution is obvious.

If a fraction  -1< q <0  then an error occurs  (the minus sign disappears):

NumberTheory[RepeatingDecimal](-1/7);

 

@OsB   First you can use  expand  command:

P:= (1/2*x^3+5/8*x^5+11/16*x^7+93/128*x^9)*y+(-1/2*x-5/4*x^3-33/16*x^5-93/32*x^7-965/256*x^9)* y^2:
P1:=expand(P);
map(t->degree(t,x)!*degree(t,y)!*t, P1);

       P1 := 1/2*y*x^3+5/8*y*x^5+11/16*y*x^7+93/128*y*x^9-1/2*y^2*x-5/4*y^2*x^3-33/16*y^2*x^5-93/32*y^2*x^7-965/256*y^2*x^9

               -2735775*x^9*y^2+263655*x^9*y-29295*x^7*y^2+3465*x^7*y-495*x^5*y^2+75*x^5*y-15*x^3*y^2+3*x^3*y-x*y^2

chomchom  To be precise, it's not your code, but mine from here. You by some reason  interrupted the discussion in this thread and start a new one. It is better not to do so. If you give a precise definition of what is called a normalized function, I will try to solve this problem.

@Agha  

a:=3:  b:=5:  sqrt('a-b'):  %;

@chomchom  Just change the initial condition for the first equation:

schro := {diff(psi(x), x, x)-(alpha*x^4+x^2-energy)*psi(x) = 0};

ic := {psi(3) = 0, (D(psi))(3) = 1};

Ic := [{psi(3) = 0, (D(psi))(3) = -1}, % $ 2];

E:=[1.06538, 5.74795, 8.35258]:

schro1 := [seq(subs(energy = e, alpha = 0.1, schro), e=E)];

soln1 := [seq(dsolve(schro1[i] union Ic[i], {psi(x)}, type = numeric), i=1..nops(E))];

with(plots):

display(seq(odeplot(soln1[i], [x, psi(x)], -3 .. 3, color=[red,blue,green][i]), i=1..nops(E)));

@chomchom  You can use  seq  command:

schro := {diff(psi(x), x, x)-(alpha*x^4+x^2-energy)*psi(x) = 0};

ic := {psi(3) = 0, (D(psi))(3) = 1};

E:=[1.06538, 5.74795, 8.35258]:

schro1 := [seq(subs(energy = e, alpha = 0.1, schro), e=E)];

soln1 := [seq(dsolve(schro1[i] union ic, {psi(x)}, type = numeric), i=1..nops(E))];

with(plots):

display(seq(odeplot(soln1[i], [x, psi(x)], -3 .. 3, color=[red,blue,green][i]), i=1..nops(E)));

of the initial problem everyone can see in this post .

@Carl Love  I showed only the initial step - how to integrate the equation. I think that OP will guess what to do next. If not, here's the complete solution: 

                     

 

 Addition:  simplify command can be omitted,  ie just write  2*%

@brian bovril  You use combinat:-choose command two times: to select the names and separately their numerical characteristics.  In this case the order of the relevant sublists is broken. Possible workaround - combine in each sublist a name and a corresponding number:

restart;

Area:=d->Pi*(1/2*d)^2:

s := Area(15);

m := Area(20);

l := Area(25);

Obj:=(s+m+l)*(1/4);

P := [[S/2,s/2], [M/2,m/2], [L/2,l/2]];

A := combinat:-choose(P);

ans:=select(a->simplify(`+`(seq(a[i,2], i=1..nops(a)))=Obj), A);

k:=nops(ans);

pos:=seq(ListTools:-SearchAll(ans[i],A),i=1..k);

 

 

 

@Carl Love

If we can not disprove a certain statement, then we consider it a true:

evalb(a<>x); 

                                         true

@emendes  Test1  procedure generalizes  Test  procedure to any number of variables ( f  is the list of expressions,  v  is the list of variables):

Test1:=(f, v)->`if`(`or`(seq(depends(f[i], v[i]) and not depends(f[i], {v[]} minus {v[i]}), i=1..nops(v))) , false, true):

I did not check your options (no free time).

 

Carl, your version can give a result that is different from mine:

f:=[a,b,c]: v:=[x,y,z]:

Test1(f, v);

valid(f, v);

                                                true

                                                false

 

I think OP will decide which version is more suitable to him.

 

 

 

First 73 74 75 76 77 78 79 Last Page 75 of 132