Stephan

45 Reputation

2 Badges

10 years, 227 days

MaplePrimes Activity


These are questions asked by Stephan

Hello,

I'd like to clean up my project a bit. In a chapter of a project I made lots of calculations and declared a many (30) variabeles (Table, Numeric, Formula, ..)

Is there a way to remove all variable's except specified one's? (If it is possible I don't want to use an external file to write it to and read it back after a restart)

Is there a way to do a "restart" and preserve only the one's (2) that I need for my next chapter?
Or if not, without a "restart" and remove all variables except specified one's?

Thanks for your help, 

Hello,
Maple does not cancel out a variable.

Why is that?

Is there a way to solve this? 

(I pasted my code on the bottom of this message)

 

Thanks for your help/advice,

Stephan

restart:
M(x):=piecewise(x<=l,1/2*(q*x^2)/(EI)-3/8*(q*l*x)/(EI),l<x,1/2*(q*x^2)/(EI)-13/8*(q*l*x)/(EI)+5/4*(q*l^2)/(EI)):
M(x):=M(x)*(-EI);
# simplify() does not work.....?
M(x):=simplify(%) assuming EI>0;
# Wiht EI cancelled out by hand it schould look like:
M(x):=piecewise(x<=l,1/2*(q*x^2)-3/8*(q*l*x),l<x,1/2*(q*x^2)-13/8*(q*l*x)+5/4*(q*l^2));

 

Hello,

I have to simplify a piecewise function and Maple gets a more complicated solution than needed.




I don't know how to handle this kind of problems with Maple?
I don't understand why Maple doesn't see this?
Am I doing something wrong?

Thanks in advance for your help / advice.


# the code of my example
restart:
Mf(x):=piecewise(x<=L/2,1/2*x*F,x>1/2*L,1/2*x*F-F*(x-1/2*L));
# Make a dimensionless function:
# -    Mf(x):= Mf(xi)*F*L
# -    variable ξ  ( xi:=x/L )
eq[1]:=Mf(xi)*F*L=Mf(x);
Mf(xi):=solve(eq[1],Mf(xi));
Mf(xi):=subs(x=xi*L,Mf(xi));
# F is the Force and L is the Length of the beam:
Mf(xi):=simplify(Mf(xi)) assuming F>0,L>0;
print("When I simplify this function by hand it will be");
Mf(xi):=piecewise(xi<=1/2,1/2*xi,xi>1/2,-1/2*xi+1/2);




Hello,

Maple needs 827 characters to write a equation of a straight line.
Is that true or what am I doing wrong?   

Can anybody help me or give a direction to handle with such problems?

Putting
  assume(2<alpha , alpha<=4);about (alpha);
before it does not help either.

f:=-(6*(3*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4-12*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3-6*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4+16*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+24*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3+3*(alpha-1+sqrt(alpha^2-3*alpha+2))^4/(alpha-1)^4-8*alpha^2*(alpha-1+sqrt(alpha^2-3*alpha+2))/(alpha-1)-24*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2-12*(alpha-1+sqrt(alpha^2-3*alpha+2))^3/(alpha-1)^3+8*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+8*alpha+(8*(alpha-1+sqrt(alpha^2-3*alpha+2)))/(alpha-1)-7))/(alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2-2*alpha*(alpha-1+sqrt(alpha^2-3*alpha+2))/(alpha-1)-(alpha-1+sqrt(alpha^2-3*alpha+2))^2/(alpha-1)^2+(2*(alpha-1+sqrt(alpha^2-3*alpha+2)))/(alpha-1)-1)^4;

Hello,

• Is there a simple way to find the domain for the real solutions of f(x)?

• And is there a way to let maple get the part of f(x) with the sqrt?
   (not by typing it by hand as I dit below)

• Is there a way to write the summary of the found domains in one line?

Thanks for your help. 





restart:
# How to find the Domain for real solutions for x?
f(x):=(x-1+sqrt(x^2-3*x+2))/(x-1);
discont_for_x=discont(f(x),x);
# x<>+1 (because the de denom=0 is not allowed)
denom(f(x))=0;
x={solve(denom(f(x))=0,x)};
# x<=1 union  2<=x (because the part under the sqrt must be >=0 to give Real solutions)
sqrt(x^2-3*x+2);
0<=x^2-3*x+2;
x=solve(0<=x^2-3*x+2,x);




1 2 Page 1 of 2