Kitonum

21073 Reputation

26 Badges

16 years, 193 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Blanc  It's strange that it doesn't work in Maple 2023. Try adding the  real  option. Upload your worksheet here.

restart;
f := (x, n) -> 2^n/(1 + n*2^n*x^2) - 2*x^2*(2^n)^2*n/(1 + n*2^n*x^2)^2;
solve(f(x,n)>0, x, parametric=full) assuming real, n::integer;
Eq:=simplify(f(x,n));
solve(Eq>0, x) assuming  real, n>0;
solve(Eq>0, x) assuming  real, n=0;
solve(Eq>0, x) assuming  real, n<0;


Also try using the  useassumptions  option:

restart;
f := (x, n) -> 2^n/(1 + n*2^n*x^2) - 2*x^2*(2^n)^2*n/(1 + n*2^n*x^2)^2;
solve(f(x,n)>0, x, parametric=full, useassumptions) n::integer;
Eq:=simplify(f(x,n));
solve(Eq>0, x, useassumptions) assuming  n>0;
solve(Eq>0, x, useassumptions) assuming  n=0;
solve(Eq>0, x, useassumptions) assuming  n<0;

 

Here is another solution for my example. It is based on a parametric representation of the curve  11*x^3-9*x^2*y+27*x*y^2+7*y^3-18*x^2-24*x*y+18*y^2=0. Well-known formulas are used. The results coincide with the results obtained by @Rouben Rostamian  :

restart;
P:=(x,y)->11*x^3-9*x^2*y+27*x*y^2+7*y^3-18*x^2-24*x*y+18*y^2:
solve(P(x,y)=0, {x(t),y(t)});
assign(%);
DP:=simplify(diff([x,y], t));
D2P:=simplify(diff(DP, t));
T:=solve({x=0,y=0}, explicit);
t1:=eval(t,T[1]); t2:=eval(t,T[2]);
simplify(rationalize(eval(DP[2]/DP[1], t=t1)));
simplify(rationalize(eval(DP[2]/DP[1], t=t2)));
expand(rationalize(eval((DP[1]*D2P[2]-DP[2]*D2P[1])/DP[1]^3, t=t1)));
expand(rationalize(eval((DP[1]*D2P[2]-DP[2]*D2P[1])/DP[1]^3, t=t2)));

         

 

@Rouben Rostamian  Thank you very much for your solution! 

@Rouben Rostamian  

I tried to apply your method to the following example of an implicitly defined real-valued function. The graph shows that in the neighborhood of the singular point (0,0) there is no single-valued function y(x) , but there are 2 intersecting smooth curves. What do the results (2/3 and infinity) mean geometrically?

 

restart;
P:=(x,y)->11*x^3-9*x^2*y+27*x*y^2+7*y^3-18*x^2-24*x*y+18*y^2:
plots:-implicitplot(P(x,y), x=-1..3, y=-1..3, gridrefine=3, scaling=constrained);

x0:=0: y0:=0:
D[1](P)(0,0), D[2](P)[2](0,0);
 
implicitdiff(P(x,y), y, x);
subs(x=x0, %);
limit(%, y=y0);

implicitdiff(P(x,y), y, x, x);
subs(x=x0, %);
limit(%, y=y0, left), limit(%, y=y0, right);
 

 

0, 0

 

-(11*x^2-6*x*y+9*y^2-12*x-8*y)/(-3*x^2+18*x*y+7*y^2-8*x+12*y)

 

-(9*y^2-8*y)/(7*y^2+12*y)

 

2/3

 

4*(-495*x^5-167*x^4*y-186*x^3*y^2-2178*x^2*y^3+1013*x*y^4+357*y^5+876*x^4+1896*x^3*y-264*x^2*y^2-2280*x*y^3+876*y^4-144*x^3-48*x^2*y+336*x*y^2-144*y^3-624*x^2-832*x*y+624*y^2)/(-27*x^6+486*x^5*y-2727*x^4*y^2+3564*x^3*y^3+6363*x^2*y^4+2646*x*y^5+343*y^6-216*x^5+2916*x^4*y-10656*x^3*y^2+4104*x^2*y^3+7896*x*y^4+1764*y^5-576*x^4+5184*x^3*y-10320*x^2*y^2+3744*x*y^3+3024*y^4-512*x^3+2304*x^2*y-3456*x*y^2+1728*y^3)

 

4*(357*y^5+876*y^4-144*y^3+624*y^2)/(343*y^6+1764*y^5+3024*y^4+1728*y^3)

 

-infinity, infinity

(1)
 

 

Download implicit.mw

@AHSAN  Your problems with integration are related to the fact that for some values ​​of the parameter  k  the denominator of the expression  Pre  is 0 and the function is not defined (its graph goes to infinity). Therefore, we can first find such values ​​of the parameter  k  and use the corresponding assumption on  k  when integrating:

restart; 
Pre := -(6*(x-1))*(k-1)*x/(((x-1)*k-x)^2*(k+1)); 
sol := solve(denom(Pre) = 0, x); 
solve({sol[1] >= 0, sol[1] <= 1}, k); 
int(Pre, x = 0 .. 1)  assuming k > 0;

                

@AHSAN  I don't understand why you integrate the expression  Pre ? What does it have to do with your problem  "Need to plot maximum relation by considering Pre_max alog vertical axis and k along x axis or horizontal axis" ?

@mmcdara 

`(Probability(Total)=50)` = (Probability(Total <=50)+Probability(Total >=50)) - 1;

                 

@nm  The answer is not necessarily the greatest common divisor of the numbers 45 and 63. The answer can be any common divisor of this numbers.

@Aixleft math 

restart;
solutions := solve({v1^2 = 2*g*(h-h1), (1/2)*g*t^2 = h2, v1*t+(1/2)*g*t^2 = h1}, {h, t, v1}, explicit): 
selected_solutions := select(p->op(1,eval(t,p))<>-1, [solutions])[]; 

     

@Raafat  Maybe you want these points to be connected by line segments:

S:=seq(P(1,2,n), n=0..10):
A:=plots:-pointplot([S][1..4], color=red, symbol=solidcircle, symbolsize=15):
B:=plot([S][1..4], linestyle=3, color=blue):
plots:-display(A,B, view=[0..110,0..16]);

                  

 

@GFY  Maple 2018.2 solves this system without any problems. Try to specify the list of unknown functions in the code:


 

restart

couple := diff(eta(t), `$`(t, 2))+`&omega;__2`*eta(t)+B*(diff(varphi(t), `$`(t, 2))) = 0, diff(varphi(t), `$`(t, 2))+`&omega;__2`^2*varphi(t)+beta*(diff(eta(t), `$`(t, 2))) = 0

diff(diff(eta(t), t), t)+omega__2*eta(t)+B*(diff(diff(varphi(t), t), t)) = 0, diff(diff(varphi(t), t), t)+omega__2^2*varphi(t)+beta*(diff(diff(eta(t), t), t)) = 0

(1)

dsolve([couple], [eta(t), varphi(t)])

{eta(t) = (1/2)*(exp((1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))*(1+omega__2*(4*B*beta+omega__2-2))^(1/2)*_C2+_C2*exp((1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))*omega__2+exp(-(1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))*(1+omega__2*(4*B*beta+omega__2-2))^(1/2)*_C1+_C1*exp(-(1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))*omega__2-exp(-(1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))*(1+omega__2*(4*B*beta+omega__2-2))^(1/2)*_C3-exp((1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))*(1+omega__2*(4*B*beta+omega__2-2))^(1/2)*_C4+_C3*omega__2*exp(-(1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))+_C4*omega__2*exp((1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))-_C2*exp((1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))-_C1*exp(-(1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))-_C3*exp(-(1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))-_C4*exp((1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1)))/beta, varphi(t) = _C1*exp(-(1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))+_C2*exp((1/2)*(-2*omega__2*((1+omega__2*(4*B*beta+omega__2-2))^(1/2)-omega__2-1)*(B*beta-1))^(1/2)*t/(B*beta-1))+_C3*exp(-(1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))+_C4*exp((1/2)*2^(1/2)*((B*beta-1)*(omega__2+1+(4*B*beta*omega__2+omega__2^2-2*omega__2+1)^(1/2))*omega__2)^(1/2)*t/(B*beta-1))}

(2)

NULL

NULL

NULL

NULL

NULL


 

Download question928_new.mw

@Saha In fact, you are plotting the same graph for one value of the parameter Nc. To plot graphs for different values, all calculations must be done again (solving the system, etc.). This can be easily done using a for-loop:


 

"restart;  Sh:=0.5: R[d]:=0.7: alpha:=Pi/(2):Nc:=[0.2,0.5,1,1.5,2]: H:=0.4: `&epsilon;`:=0.4:  for k from 1 to 5 do  f:=x->sum(a[i]*x^(i),i=0..3):  F(x):=(1+4*R[d])*diff(f(x),x$2)-Sh*sin(alpha)*f^(2)(x)-(Nc[k]*(1-`&epsilon;`)+H)*f(x); eq[1]:=f(1)=1;  eq[2]:=f'(0)=0;  eq[3]:=eval(F(x), x=1)=1;  eq[4]:=eval(F'(x),x=0)=0;   p:=fsolve({eq[1],eq[2],eq[3],eq[4]},{a[0],a[1],a[2],a[3]}); P[k]:=eval(f(x), p);    od:  g(x):=0.7605263158+0.2394736842*x^2 :  plot([seq(P[i],i=1..5), g(x)], x=0..1, linestyle=[1$5, 3], color=[red,blue,green,cyan,brown,khaki]);  "

 

 


 

Download MSNL_new1.mw

@Alfred_F  What did you find difficult in my solution? It is based on direct calculation of triangle areas using coordinates of vertices of arbitrary parallelogram. Of course, you can solve it in another way, for example using commands of geometry package:

restart;
local D: 
with(geometry):
assume(a>0, c>0):
point(A,0,0): point(B,b,c): point(C,a+b,c): point(D,a,0): 
OnSegment(M,D,C,2/3): OnSegment(N,B,M,1): 
area_AND:=area(triangle(t,[A,N,D])):
area_BCM:=area(triangle(t1,[B,C,M])):
area_BCM/area_AND; 

 

@Ronan If you solve it in your head, it is easier to consider similar triangles  AFE and BCF  with a similarity coefficient of  1/2 . It follows that   BF = 2*FE . Also  S(BCE) = 1/2*S(ABCD) . So  S(EFC) = (1/2)*(1/3)*S(ABCD) = (1/6)*24 = 4  

@Carl Love Thanks for this. I didn't know this command before. Of course Iterator:-TopologicalSorts is the shortest way to generate permutations with restrictions.

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