## min piecewise function...

Hi all,
I need to find mina(w) then a=-1,0,1 and

w := piecewise((x-a)/t <= -10, 202*a-200*x-(202001/101)*t, (x-a)/t <= -910/101, 3*a-x-(1011/101)*t, (x-a)/t <= 910/101, 2*a-t, (x-a)/t <= 10, a+x-(1011/101)*t, 10 < (x-a)/t, -198*a+200*x-(202001/101)*t)

Also need to plot it, i think it should look like this

Thanks

## how to plot a physical quantity with complex funct...

I am getting a complex solution for a physical quantity, how can I plot it. Should I plot the real part or modulus?

solution is,

C1*sqrt(4*tau^2*M^2*lambda^2+Q^2)*LegendreP((1/2*I)*sqrt(7)-1/2, I*sqrt(7), (2*I)*lambda*M*tau/Q)+C2*sqrt(4*tau^2*M^2*lambda^2+Q^2)*LegendreQ((1/2*I)*sqrt(7)-1/2, I*sqrt(7), (2*I)*lambda*M*tau/Q)

where C1 and C2 are integration constants.

## Problem in Physics package with multiplication by ...

Perhaps I am being daft, but to me the Physics package seems, quite surprisingly, to have trouble multiplying by a nonzero, non-square matrix. The test code

`restart:with(Physics):Matrix(2,2,fill = 0) . Vector(2),Matrix(2,2,fill = 1) . Vector(2),Matrix(2,3,fill = 0) . Vector(3);Matrix(2,3,fill = 1) . Vector(3);`

produces the following output:

Error, (in Vector[column]) Matrix index out of range

i.e., the last expression cannot be evaluated; while the test code (where no loading of the Physics package is performed)

`restart:#with(Physics):Matrix(2,2,fill = 0) . Vector(2),Matrix(2,2,fill = 1) . Vector(2),Matrix(2,3,fill = 0) . Vector(3),Matrix(2,3,fill = 1) . Vector(3);`

produces the following expected output:

PS: To be sure, I have from http://www.maplesoft.com/products/maple/features/physicsresearch.aspx downloaded the latest version (2014, March 19, 4:0 hours) of the Physics package for Maple 17 (the version I am running).

## is there any built-in function equivalent to set m...

Please i don't want to convert from list to set then apply set minus and convert back because it loses its order and repititions.

so i want something that can for example do the following:

list_minus([1,2,4,6,2,1,3,6,2],[7,4,2,5,2]) = [1,6,1,3,6,2]

so it removes repititions from left and order is retained.

## problem with convergence ...

Hi all

I dont know why some Z1 appears on the screen and the code does not converge.
thanks alooooot

restart;
n:=3;
nn:=3;
m:=1;
BB:=1;
BINF:=5:
pr:=7;
digits:=10;
>
eq1:=diff(f(tau),tau\$3)+((3/5)*f(tau)*diff(f(tau),tau\$2))-(1/5)*(diff(f(tau),tau\$1))^2+((2/5)*tau*diff(h(tau),tau\$1))-((2/5)*h(tau))-BB*diff(f(tau),tau\$1)=0;
eq11:=(1/pr)*diff(h(tau),tau\$3)+(3/5)*f(tau)*diff(h(tau),tau\$2)=0;

h(tau):=sum(p^i*h[i](tau),i=0..nn);
f(tau):=sum(p^i*f[i](tau),i=0..n);

H1:= p*(diff(f(tau),tau\$3)+((3/5)*f(tau)*diff(f(tau),tau\$2))-(1/5)*(diff(f(tau),tau\$1))^2+((2/5)*tau*diff(h(tau),tau\$1))-((2/5)*h(tau))-BB*diff(f(tau),tau\$1))+(1-p)*(diff(f(tau),tau\$3)):
H11:= p*((1/pr)*diff(h(tau),tau\$3)+(3/5)*f(tau)*diff(h(tau),tau\$2))+(1-p)*(diff(h(tau),tau\$3)):
>
eq2:=simplify(H1):
eq22:=simplify(H11):
eq3:=collect(expand(eq2),p):
eq33:=collect(expand(eq22),p):
eq4:=
convert(series(collect(expand(eq2), p), p, n+1), 'polynom');
eq44:=
convert(series(collect(expand(eq22), p), p, n+1), 'polynom');
for i to n do
s[i] := coeff(eq4, p^i) ;
print (i);
end do:
for i to nn do
ss[i] := coeff(eq44, p^i) ;
print (i);
end do:
s[0]:=diff(f[0](tau), tau\$3);
ss[0]:=diff(h[0](tau), tau\$3);
ics[0]:=f[0](0)=0, D(f[0])(0)=0, D(f[0])(BINF)=0;
icss[0]:=h[0](BINF)=0, D(h[0])(0)=1, D(h[0])(BINF)=0;

dsolve({s[0], ics[0]});
f[0](tau):= rhs(%);
#dsolve({ss[0], icss[0]});
h[0](tau):= -exp(-tau); #;rhs(%);

>
>
for i to n do
f[ii-1](tau):=convert(series(f[ii-1](tau), tau, nn+1), 'polynom');
h[ii-1](tau):=convert(series(h[ii-1](tau), tau, nn+1), 'polynom');
s[i]:=simplify((s[i]));
ics[i]:=f[i](0)=0, D(f[i])(0)=0, D(f[i])(BINF)=0;
dsolve({s[i], ics[i]});
f[i](tau):=rhs(%);
ss[i]:=(ss[i]);
icss[i]:=h[i](BINF)=0, D(h[i])(0)=0, D(h[i])(BINF)=0;
dsolve({ss[i], icss[i]});
h[i](tau):=rhs(%);

end do;

f(tau):=sum((f[j])(tau),j=0..n);
with(numapprox):

plot(diff(f(tau),tau),tau=0..5,color=blue,style=point,symbol=circle,symbolsize=7,labels=["tau","velocity"]);

## how to convert function into this form...

x*(y+z)/x

convert any polynomial to Divide(Mult(x, Plus(y+z)), x)

## help solving a prob...

Hi can you please help me? I want to write a program in Maple code, using the Newton-Raphson method, to solve the equation tan(x) −x-1=0 .  the approximate root is 1.5.
I tried doing this using a while loop to compare the last and current iterates, but something is not working.

Thanks

## how to plot imaginary part...

y = -x+sqrt(-5*x)

how to plot this in 2d or 3d graph

## Error / differential equation system...

Hi,

What is the reason/Why:

Error, (in dsolve/numeric/bvp) unable to achieve requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.66e-1), consider increasing `maxmesh` or using larger `abserr`

Thanks for the help :)

## Second order direction field problems...

I'm trying to plot the direction field of the second order differential equation x''=x'-cos(x) using dfieldplot:

> with(DEtools); with(plots);
> f1 := (x, y) options operator, arrow; diff(x(t), t)-cos(x(t)) end proc;
/ d \
(x, y) -> |--- x(t)| - cos(x(t))
\ dt /
> dfieldplot([diff(x(t), t) = y(t), diff(y(t), t) = f1(x(t), y(t))], [x(t), y(t)], t = -2 .. 2, x = -2 .. 2, y = -2 .. 2);
Error, (in DEtools/dfieldplot) cannot produce plot, non-autonomous DE(s) require initial conditions.
>

The error I'm getting says I need initial conditions, but I wasn't provided with any. Is there another way to plot this? Sorry if this is dumb question, but I've only ever plotted first order equations.

## How to solve it with Maple?...

The equation

x^7+14*x^4+35*x^3+14*x^2+7*x+88 = 0

has the unique real root

x = (1+sqrt(2))^(1/7)+(1-sqrt(2))^(1/7)-(3+2*sqrt(2))^(1/7)-(3-2*sqrt(2))^(1/7).

Here is its verification:

Is it possible to find that in Maple? I unsuccessfully tried the solve command with the explicit option.

## How do I solve a system of equations in Maple 17 f...

I was required to purchase Maple 17 for my upcoming Calculus III course, and until now, I have been using my TI-Nspire CAS CX for all of my CAS needs.  I am going through various tutorials/labs in an effort to learn how to use the Maple 17 Software. As a part of this process, I am attempting to solve a system of equations and was told to use the following command:

>solve({2*x+3*y=7,5*x+8*y=9},{x,y});

{y=-17,x=29}.

Instead, I have received the following error message, which has no help attached to it through the help page.

solve({2*x+3*y = 7, 5*x+8*y = 9}, {x, y});
Warning, solving for expressions other than names or functions is not recommended.

I am hoping this has something to do with Mac vs. Windows software, and that it has a simple solution.  I would greatly appreciate any guidance!

## change direction of normal in PlotPositionVector...

There are two normals to a point on a curve.  How do I get the PlotPositionVector of Student[VectorCalculus] to point in the other direction.

with(Student[VectorCalculus]:

R1:=PositionVector([p,p^2],polar[r,t]):

PlotPositionVector(-R1,p=1..2,normal=true,points=[1.5])

The normal vector points towards the insided of the curve.  Can I use PlotPositionVector to have it point the opposite way (towards the outside of the curve)?

## Does this ode has a non-trivial sol?...

restart:

ODE:=diff((-diff(u(y),y))^n,y)=A;

bcs:=D(u)(0)=0,u(h)=0;

dsolve({ODE,bcs});

u(y) = 0