Kitonum

21690 Reputation

26 Badges

17 years, 186 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Markiyan Hirnyk  My code is correct, because there is not verified  a prime number  p  itself, but the next prime number is checked. Of course, you can write the equivalent code:

restart;

p:=41: n:=0:

while p<=107 do

sol:=msolve(y^2 + y - 11=0, p);

if  sol<>NULL then  n:=n+1; L[n]:=[p, sol]  fi;

p:=nextprime(p);

od:

L:=convert(L, list):

op(L);

@Vesnog   Read help to  name .

@Preben Alsholm  This system can be easily solved numerically, for example for  h1=0, h2=1.

restart;

Eq2 := diff(T(y), y, y)+(diff(sigma(y), y))*(diff(T(y), y))+(diff(T(y), y))^2+(exp(-y)+exp(y))^2 = 0;

Eq3 := diff(sigma(y), y, y)+diff(T(y), y, y) = 0;

bcs2 := T(0) = 0, T(1) = 1, sigma(0) = 0, sigma(1) = 1;

sol := dsolve({Eq2, Eq3, bcs2}, numeric);

plots[odeplot](sol, [[y, T(y)], [y, sigma(y)]], y = 0 .. 1, color = [red, blue]);

 

But if these values  h1  and  h2  are substituted into your explicit formulas, an error occurs "division by zero"

 

@Carl Love   Very ingenious way! Vote up.

@H-R   Read help to these commands. Everything is explained in detail.

@Dmitry Lyakhov

Examples:

A0:=(x,y)->x^3+y^2+1;  # or

A1:=unapply(x^3+y^2+1, x,y);

A0(2,3), A1(2,3);  

 

 

@Dmitry Lyakhov  If you speak in Russian, you can ask your questions here

@Markiyan Hirnyk  Only one inequality is allowed to multiply by a number. Should be

map(x->-3*x, `and`((1/3)*x-1 > 1, (1/3)*x-1 < 5));

                             -x < -6 and -18 < -x

@Markiyan Hirnyk  You are wrong. Just noticed that substitutions the inequality signs is not required. Maple does this automatically.

Example:

(-3)*(x < 2);

         -6 < -3*x

 

@Markiyan Hirnyk  You multiply by -3, not me. If I multiply by -3, of course I would have changed the inequality sign by reversed.

(1/3)*x-1 > 1 and (1/3)*x-1 < 5;

subs(`>` = `<`, `<` = `>`, map(x->-3*x, %));

solve(%);

 

 

@Markiyan Hirnyk  I do not understand the meaning of your comment.

@Preben Alsholm  Thank you. Very useful comment!

@Carl Love  Can we write this using  InertForm  package:

add(convert(i, symbol), i = 1 .. 20) = `+`($ 1 .. 20);

 

 

@Markiyan Hirnyk   This actually works. In fact, the result for a=1 (formula (1))  is the same as yours.

 

g := abs((x+4)/(x*a+2)) > 1/x:

sol := solve(g, [a, x]):

select(t -> is(eval(t[1], a = 1)), sol);

eval(map(t -> subsop(1 = NULL, t), %), a = 1);

 

@Preben Alsholm   If you write

restart;
n:=5: #Example
for i to n do B[i]:=LinearAlgebra:-RandomMatrix(n) end do; #Example B's.
A:=LinearAlgebra:-IdentityMatrix(n);
for i from 1 to n do A:=A.B[i] end do:
A;

 

then get the same result. 

 

Addition.  The same result can be gotten shorter:

`.`(seq(B[i], i=1..5));

Another simple way to remove the contradiction - use  unapply  instead  arrow to define a function:

f:=unapply(int(x - t, t=0 .. x), x);

f(t);

                  f := x -> 1/2*x^2

                       1/2*t^2

First 102 103 104 105 106 107 108 Last Page 104 of 133