Items tagged with simplify simplify Tagged Items Feed

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);




Hi all,

I will use the following dummy example.

with function,f

f:=(xid,yid)->sum(x[i],i=1..xid)*sum(y[i],i=1..yid);

 

and a complicated term, myterm


myterm:=(f(3,4)+f(2,2))*f(1,1):
myterm:=expand(myterm);

 

'if' i have some previous knowledge, or know a bit of the term, i can find the structure by doing this


repar:=[f(1,1),f(2,2),f(3,4)];  # Or with more f(xid,yid) terms

tmp:=seq(repar[i]=ff[i],i=1..3);
simplify(myterm,{tmp});          # This is fine, gives me what i want

 

But, can we go further, and more 'obvious'

 

Given the fucntion f, same as before, and the same 'myterm'

can I have this
restart:
iwant:=(f(3,4)+f(2,2))*f(1,1);  # as a result, straightforward

so I dont have to go back to 'repar' and find that the terms exactly are.

 

Thanks,

 

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;



Can anybody tell me what I'm doing wrong?
Or does anybody have some tips for things like this? (Things like this occur often)

Stephan

ali := (1/12)*(12*c[4]*ln(x+1)*x^4+48*c[4]*ln(x+1)*x^3+72*c[4]*ln(x+1)*x^2+48*c[4]*ln(x+1)*x+12*c[1]*x+30*c[2]*x^2+12*c[2]*x+36*c[3]*x^3+36*c[3]*x^2+12*c[3]*x+12*c[5]*x^5+48*c[5]*x^4+72*c[5]*x^3+48*c[5]*x^2+3*c[0]*x^4+12*c[0]*x^3+18*c[0]*x^2+12*c[0]*x+4*c[1]*x^4+16*c[1]*x^3+24*c[1]*x^2+6*c[2]*x^4+24*c[2]*x^3+12*c[3]*x^4+12*c[4]*ln(x+1)+12*c[5]*x)/(x+1)^4+.1

but simplify(ali-simplify(ali)) is not equal to 0!

 

Hi There,

 

Could you let me know how to tell Maple to use the ln simplification to give -ln(x)+ln(y) = ln(y/x).

 

I tried following command.

simplify(-ln(x)+ln(y), ln)

 

However, it is not able to give the required simplification.

Please tell me how to do about the following problem to me.

 

g:=(b*y)^k*k*y;

simplify(%);

Then, what I obtained was (b*y)^k*k*y, not (b^k)*k*y^(k+1).

expand of the command brought the same answer not (b^k)*k*y^(k+1).

Please tell me what was wrong to my calculation.

 

Thank you in advance.

 

Taro.

 

I can't simplify the expression of 

(1/a[x])^(-k-1+epsilon)/(1/a[I])^(-k-1+epsilon)

to 

(a[x]/a[I])^(k+1-epsilon);

 

Please tell me how to do this.

 

Thank you in advance.

 

Taro yamada

how to convert decimal to fraction without simplify

for example

convert(0.25, fraction)

expect 25/100, but not 1/4

Hi,

I have a problem with dsolve in the following code

restart;
>
n:=20;
m:=1;
cc:=-200;
zzeta:=0.1;
sefr1:=0.3;
sefr:=0.2;
MM:=0;
lambda:=0.1;
Br:=1;
nn:=3;
>
>
#u(tau):=tau;
u(tau):=421.7129935*tau-2217.587728*tau^2+8897.376593*tau^3-27612.59182*tau^4+64248.00336*tau^5-1.083977605*10^5*tau^6-10.57029600-1.080951714*10^6*tau^13+7.999517316*10^5*tau^14-4.788741005*10^5*tau^15+2.309563748*10^5*tau^16+26511.11102*tau^18-5959.001794*tau^19+1.148523882*10^5*tau^7-95.23809524*tau^21+4.545454545*tau^22-9435.563781*tau^8-2.587683745*10^5*tau^9+6.473880128*10^5*tau^10+948.0272727*tau^20-88660.41892*tau^17-1.008692404*10^6*tau^11+1.175504242*10^6*tau^12;
>
>
B := 1+(2*(1-zzeta))*Br*(int(tau*(diff(u(tau), tau))^2, tau = (1/2)*zzeta*(1-zzeta) .. 1/2*(1-zzeta)));
eq4 := 4*B*u(tau)-(1+zzeta)*(diff(tau*(diff(theta(tau), tau)), tau))/tau-(1+zzeta)*Br*(diff(u(tau), tau))^2;


theta(tau):=sum(p^ii*theta[ii](tau),ii=0..nn);
HH:= p*((4*(1+(2*(1-zzeta))*Br*(int(tau*(diff(u(tau), tau))^2, tau = (1/2)*zzeta*(1-zzeta) .. 1/2-(1/2)*zzeta))))*u(tau)-(1+zzeta)*(diff(theta(tau), tau)+tau*(diff(theta(tau), tau, tau)))/tau-(1+zzeta)*Br*(diff(u(tau), tau))^2)+(1-p)*(diff(theta(tau),tau$2)):
eq5:=simplify(HH):
eq6:=collect(expand(eq5),p);

eq7:=
convert(series(collect(expand(eq5), p), p, nn+1), 'polynom');


for ii to nn do
ss[ii] := (coeff(eq7, p^ii)) ;
print (ii);
end do;

ss[0]:=diff(theta[0](tau), tau, tau);

icss[0]:=theta[0](zzeta/(2*(1-zzeta)))=0, D(theta[0])(1/(2*(1-zzeta)))=1;

dsolve({ss[0], icss[0]});
theta[0](tau):= rhs(%);


for ii to nn do
ss[ii]:=evalf[5](ss[ii]);
icss[ii]:=theta[ii](zzeta/(2*(1-zzeta)))=0, D(theta[ii])(1/(2*(1-zzeta)))=0;
dsolve({ss[ii], icss[ii]});
theta[ii](tau):=rhs(%);
end do;

I would be most grateful if you help me to find this problem.

Thanks for your attention in advance

 

I'd expect the following to give the result "c+2".

> c := a+b

> simplify(a+b+2)

How can I let Maple know that I'd prefer it to write "c" in place of "a+b" when possible?

I'm simplifying this Reynolds Equation starting from here:

Reynolds:=Diff(p(x)*h(x)^3/(12*mu)*Diff(p(x),x),x)-u(x)/2*Diff(p(x)*h(x),x)+Diff(p(x)*h(x)^3/(12*mu)*Diff(p(x),z),z)=Diff(p(x)*h(x),t):

 

Then I apply the dchange command:

dchange({p(x)=P(X)*Pa,x=Lx*X,h(x)=H(X)*h2},Reynolds,{P,h,X,u,H});

 

The problem is that it expands the new derivatives and I need the equation in its compact form.

How do I tel Maple only to make the substitution but not to expand the result?

I know that it expands by default, can I modify that?

 

 

I want to find the area of the triangle ABC with the sides are a, b, c. I tried

a:=sqrt(91)/6:

b:=sqrt(17)/2:

c:=sqrt(13)/3:

p:=(a+b+c)/2:

s:=simplify(sqrt(p*(p-a)*(p-b)*(p-c)));

How can I get the result sqrt(523)/24?

I cannot show that the following two sums(A and B) are equal to each other.

How can I simplify the difference(A-B)?

 

A := sum((-1)^(i-1)*factorial(n0)/(factorial(n1)*(n1+i)^2*factorial(i-1)*factorial(n0-n1-i)), i = 1 .. n0-n1);

 

B := sum(1/(n1+i), i = 1 .. n0-n1);

 

`assuming`([simplify(A-B)], [n0::nonnegint, n1::nonnegint, n1 <= n0]);

 

does not give zero. 

 

The result of a simple test: 


map(simplify, [seq(eval(A-B, n1 = 10), n0 = 20 .. 30)]);
print(`output redirected...`); 

 

is

[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

 

I am new to Maple and I have difficulties simplifying expressions like the following: (exp(a+b)+exp(a+c))*exp(-a).

I would expect to see exp(b)+exp(c) but nothing happens when I use the simplify() function.

I googled but didn't find a solution.

1 2 3 4 5 6 7 Last Page 1 of 11