Kitonum

20084 Reputation

26 Badges

17 years, 24 days

MaplePrimes Activity


These are replies submitted by Kitonum

@davtrs  This works. I added different colors to your lines.


 

with(plots); with(plottools)

grenzeu := [.25, 0, -.25, -.5]; grenzeo := [.5, .25, 0, -.25]

sigma1unter := [1822.1, -380.05, -280.97, 403.40]; sigma1ober := [2295.0, -479.14, -380.05, 876.29]; sigma2unter := [-1.5584, 92.399, 59.381, -5.9320]; sigma2ober := [-.10054, 125.42, 92.399, -4.4742]; tau12unter := [28.500, -28.500, -28.500, 28.500]; tau12ober := [28.500, -28.500, -28.500, 28.500]

nply := 4; for i to nply do sigma1P1[i] := display(line([grenzeu[i], sigma1unter[i]], [grenzeo[i], sigma1ober[i]], color = red)); sigma2P1[i] := display(line([grenzeu[i], sigma2unter[i]], [grenzeo[i], sigma2ober[i]], color = blue)); tau12P1[i] := display(line([grenzeu[i], tau12unter[i]], [grenzeo[i], tau12ober[i]], color = green)) end do

display(seq([sigma1P1[i], sigma2P1[i], tau12P1[i]][], i = 1 .. nply))

 

 


 

Download Plot_problem_new.mw

@Carl Love I just thought  D(x)  was just a name, for example:

D(x):=5:
D(x);
                                   
 5

@vv 

In the original code I replaced  0.5  by  1/2 :
is(D(x)=DD(x));
                                       
true

@whtitefall  Due to the parity of the integrand function, the answer to your question can be given without any computation  x=0 . Unfortunately, it seems that you have not understood my answer at all and again you have a lot of mistakes in your code.

@kuwait1  If we plot the expression in the denominator (without a power), it is clearly seen that it takes not only positive but also negative and zero values. Therefore, you should think about the adequacy of this model.

restart;
a := 2: Q := 5.48: d := 2.48: chi := (1/4)*Pi: phi := 0.: p := 5/2:
Expr:=(a*sin(X)*sin(phi)+d*cos(chi))^2+(a*cos(X)+d*sin(chi))^2+2*Q*((a*sin(X)*sin(phi)+d*cos(chi))^2+(a*cos(X)+d*sin(chi))^2)^(1/2)*cos(beta);
plot3d(Expr, beta=0..2*Pi, X=0..Pi);


 

@Markiyan Hirnyk  Where is your code to get this result?

@Markiyan Hirnyk  The point was  for  p=7/2  not for  p=1

@nm  It's just a way to programmatically code some symbols and combine them. Of course, in the above case, we can write down  ell  instead of  `ℓ` , but in other cases this method will be useful. Here are a few examples:

`Δx`;
`±`;
`±3`;
30^`°`;
                                              

@Mariusz Iwaniuk  convert(n, 'base', beta)  command returns the digits in reverse order.
                             

@mmcdara  In fact, these syntaxes are correct and they are documented. See the help on these commands.

@Carl Love  for the useful information on the binary search.

@Carl Love  I did not understand the meaning of your comment. Did you mean that the procedure should check that the given list already is sorted and produce an error message otherwise? Or something else?

@Loeky Haryanto 

You can leave the arrows in your code, but then you should write  g:=x->f(x)+a[i]*x^(k-1)  instead of  f:=x->f(x)+a[i]*x^(k-1) , because a contradiction arises: f  is determined through f. In fact, on the left you have one function, and on the right - the other.

This works:

restart;
P:= 7919; #(this is the1000-th prime)
S:=5000; k:=5:
a:=[0$i=1..k];
f:=[0$i=1..k];
a[1]:=S;
f:=x->a[1];

with(RandomTools):
for i from 2 to k do
a[i]:=Generate(integer(range=1..P-1));
g:=x->f(x)+a[i]*x^(k-1);
g(x);
od;

@ravenHound  May be  plots:-textplot  command will be usefull:

restart;
f:=(x,c,k)->c*x/(k+x):
plots:-display(plot([f(x,5,2), f(x,5,3)], x=0..50, color=[red,blue], size=[800,400]), plots:-textplot([[12,4.5,"k=2"], [12,3.8,"k=3"]], font=[times,16])) ;

 

I just copied your code into the Maple 2018 worksheet. There are no errors:

restart;
g := x -> (10*x)/(3+x);

f := x -> (10*x)/(5+x);

h := x -> (8*x)/(5+x);

plots:-display(
  plot( [g(x),f(x), h(x)], x=0..30, color=[red,blue, green], legend = ["k=3,c=10", "k=5, c=10","k=5,c=8"]));


Addition. plots:-display  is superfluous in your code.  

 plot( [g(x),f(x), h(x)], x=0..30, color=[red,blue, green], legend = ["k=3,c=10", "k=5, c=10","k=5,c=8"]);

works exactly the same.

First 38 39 40 41 42 43 44 Last Page 40 of 126