Kitonum

21475 Reputation

26 Badges

17 years, 49 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart;

a:=-7:  b:=2:  c:=9:

solve(a*x^2+b*x+c=0, x);

                         -1,  9/7

 

Another way (without assignment):

restart;

simplify({eval(solve(a*x^2+b*x+c = 0, x), {a = -7, b = 2, c = 9})});

                        {-1,  9/7}

! have not any problems with your expression:

expr := a*ln(u) + b*ln(u) + a*ln(v)+b*ln(v);

collect(expr, [ln(u), ln(v)]);

                  expr := a*ln(u)+b*ln(u)+a*ln(v)+b*ln(v)


                               (a+b)*ln(u)+(a+b)*ln(v)

c := a+I*b;

 ``(Re(c^2))+I*``(Im(c^2))  assuming a::realcons, b::realcons;

 

1)  Maple does not know that you assume that  a  and  b  are real numbers.

2)  Construction  ``(...)  prevents the disclosure of the parentheses.

 

poly := x^2*y+x*y*z+x*z;

poly1:=0:

for i in [op(poly)] do

if degree(i, x)=2 then poly1:=poly1+subs(x=a+b, i) else

if degree(i, x)=1 then poly1:=poly1+subs(x=c+d, i) else

poly1:=poly1+i; fi; fi;

od:

poly1;

 

 Another way:

poly := x^2*y+x*y*z+x*z;

map(t->`if`(degree(t, x)=2,subs(x=a+b,t), `if`(degree(t, x)=1,subs(x=c+d,t), t)), poly);

 

 

The following code simulates the manual solution:

Eq:=sin(x*y(x)) = x + y(x):

diff(Eq, x);

subs(y(x)=y, solve(%, diff(y(x), x)));

 

 

subs(W[0]=Re*V[0], V[0]/W[0] * diff(u(t),t));

 

Re  is an unfortunate designation because in Maple  Re  means the real part of a complex number.

You can use the construction  ``(...)  to prevent the automatic disclosure of parentheses:

A:=simplify( (a1/2+a2/2)*ln(a1/2+a2/2+sqrt((a1/2+a2/2)^2+(b1/2-b2/2)^2)+d^2)+(a1/2-a2/2)*ln(a1/2-a2/2+sqrt((a1/2-a2/2)^2+(b1/2-b2/2)^2+d^2)), {a1-a2=deltaa,a1+a2=sigmaa}):

a:=-2*b1*b2+b2^2+b1^2;  ``(factor(a));

algsubs(a=%, A);

 

 

Different way - to convert the exponent into the symbol:

A:=simplify( (a1/2+a2/2)*ln(a1/2+a2/2+sqrt((a1/2+a2/2)^2+(b1/2-b2/2)^2)+d^2)+(a1/2-a2/2)*ln(a1/2-a2/2+sqrt((a1/2-a2/2)^2+(b1/2-b2/2)^2+d^2)), {a1-a2=deltaa,a1+a2=sigmaa}):

a:=-2*b1*b2+b2^2+b1^2; subs(2=`2`, factor(a));

algsubs(a=%, A);

 

simplify( (a1/2+a2/2)*ln(a1/2+a2/2+sqrt((a1/2+a2/2)^2+(b1/2-b2/2)^2+d^2))+(a1/2-

a2/2)*ln(a1/2-a2/2+sqrt((a1/2-a2/2)^2+(b1/2-b2/2)^2+d^2)), {a1-a2=deltaa, a1+a2=sigmaa});

 

 

The parts of the cube below and above the surface  z=x^2*y:

plot3d(x^2*y , x=0..1, y = 0 .. 1, filled, color=grey, scaling=constrained, axes=normal, orientation=[25,60], lightmodel=light4);

plottools[translate](plot3d(x^2*y-1 , x=0..1, y = 0 .. 1, filled, color=grey, scaling=constrained, axes=normal, orientation=[25,60], lightmodel=light4), 0, 0, 1);

 

 

 

Сonstruction  ``(...)  was used to prevent premature simplification.  Compound inequality  a<b<c  was replaced by the equivalent  a<b and b<c

1) First step (uncovering brackets):

A:=4477.25 <= ``(expand(4477.25+.25*(t-32450)))  and  ``(expand(4477.25+.25*(t-32450)))<= 16042.25;

                     A := 4477.25 <= ``(-3635.25+.25*t) and ``(-3635.25+.25*t) <= 16042.25

 

2) Second step (adding  of 3635.25 to both sides of the inequality):

B:=lhs(op(1,A))+3635.25<=``(expand(rhs(op(1,A))+3635.25)) and ``(expand(lhs(op(2,A)))+3635.25)<=rhs(op(2,A))+3635.25;

                                  B := 8112.50 <= ``(.25*t) and ``(.25*t) <= 19677.50

 

3) Third step (dividing by 0.25 both sides of the inequality):

map(simplify@(x->x/0.25)@expand, B);

                                                         32450. <= t and t <= 78710.

 

Your original equation:

lambda:=0.1:  k:=0.2:

dsolve({diff(f(eta),eta$3)+f(eta)*diff(f(eta),eta$2)-(diff(f(eta),eta))^2+lambda*(2*f(eta)*(diff(f(eta),eta))*(diff(f(eta),eta,eta))-f(eta)^2*(diff(f(eta),eta,eta,eta)))-K* (diff(f(eta),eta)-1)=0, f(0) = 0, D(f)(0) = 1, D(f)(10) = 0}, f(eta), numeric);

      Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 4, got 3

 

After adding the extra condition  no problems:

lambda:=0.1:  k:=0.2:

dsolve({diff(f(eta),eta$3)+f(eta)*diff(f(eta),eta$2)-(diff(f(eta),eta))^2+lambda*(2*f(eta)*(diff(f(eta),eta))*(diff(f(eta),eta,eta))-f(eta)^2*(diff(f(eta),eta,eta,eta)))-K* (diff(f(eta),eta)-1)=0, f(0) = 0, D(f)(0) = 1, f(10)=0, D(f)(10) = 0}, f(eta), numeric);

plots[odeplot](%, [eta, f(eta)], 0..10, thickness=2); 

 

 

restart; with(plots):

A := animate(spacecurve, [[(t+1)*cos(phi)-1, t^2, (t+1)*sin(phi)], t = 0 .. 1, color = red, thickness = 3], phi = 0 .. 2*Pi, frames = 100):

A1 := animate(plot3d, [[(t+1)*cos(phi)-1, t^2, (t+1)*sin(phi)], t = 0 .. 1, phi = 0 .. s, style = wireframe], s = 0 .. 2*Pi, frames = 100):

B := animate(spacecurve, [[(t+1)*cos(phi)-1, sqrt(t), (t+1)*sin(phi)], t = 0 .. 1, color = red, thickness = 3], phi = 0 .. 2*Pi, frames = 100):

B1 := animate(plot3d, [[(t+1)*cos(phi)-1, sqrt(t), (t+1)*sin(phi)], t = 0 .. 1, phi = 0 .. s, style = wireframe], s = 0 .. 2*Pi, frames = 100):

C:=spacecurve([-1, t, 0], t=-0.4..1.4, linestyle=3, color=green, thickness=2):

display(A, A1, B, B1, C, axes = normal, scaling=constrained, orientation = [20, 70], labels = [x, y, z]);

 

Rotation around the axis  y= -1  can be done similarly.

x:=proc(n)

option remember;

Digits:=20;

sqrt(5+x(n-1))/6/x(n-2);

end proc:

 

x(0):=2.25:   x(1):=2.5:

evalf[10](x(366));   evalf[10](x(733));

                         0.3848385779

                          3.553804582

is((1/2)*Pi < 3.535344555);

is(3.535344555 <= (3/2)*Pi);

                             true

                             true

Let  a  and   b  are real numbers, b> 0. Then there exist  unique numbers  n  and  r, such that  a=n*b+r  and  n  is an integer and  0<=r<b . By analogy with integers  r  is the remainder of the division of  a  by  b

The following simple procedure  R  finds this remainder:

R:=proc(a,b)

expand((a/b-floor(a/b))*b);

end proc:

 

Examples:

R(5, 7/2),  R(10, 2*Pi),  R(20, 2*Pi);

plot(R(x,2*Pi), x=-4*Pi..4*Pi, discont=true, scaling=constrained);

 

 

First 239 240 241 242 243 244 245 Last Page 241 of 290