How to get a better italic D output?...

Many formulas use a capital D to define parameters. A popular example is the second moment of area "I" of a tube. In Maple we get

Both I and D are protected symbols in Maple and are therefore printed in roman. With the "local" command, I and D can be used as unprotected symbols. However, only the unprotected "I" is printed in italic (like other symbols or names do). D is still printed in roman, which spoils Maple's excellent printout (a bit).

I hope this inconsistency can be improved one day. For the time being, I am looking for better alternatives than my workaround with a fat white space in the attachment. Are there better workarounds?

Italic_I_and_D.mw

An integral done by Maple 11 but not by Maple 2021...

primes_integrale_exp.mwThe integral in x of

exp(-sqrt(x^2 + c))

was done by Maple 11 but return unevaluated in Maple 2021,

see attached worksheet

Try to solve an integral equation, Maple fsolve ti...

I am trying to solve the equation in the attached Maple file, but Maple cannot return a result.

 (1)

 (2)

say the f(x) is a Beta with parameters alpha and beta

 (3)

 (4)

 (5)

 (6)

How to limit the number of cores / threads used by...

On a shared cluster with 32 CPU cores, how do I limit Maple (called from the Linux command line) to use only 8 cores? (Certain built-in operations in Maple are parallelized by default.)

Pell Fermat equation...

I try to sove the equation x^2-10*y^2=9 with tne procedure :
genpellsolve := proc(D::posint, N::integer)
local t, u, L1, L2, sols, x, y;
if type(sqrt(D), integer) then error "D must be a nonsquare integer"; end
if; t, u := pellsolve(D); if 0 < N then L1 := 0;
L2 := floor(sqrt(1/2*N*(t - 1)/D)); elif N < 0 then L1 := ceil(sqrt(-N/D));
L2 := floor(sqrt(-1/2*N*(t + 1)/D)); else return {[0, 0]}; end if;
sols := {}; for y from L1 to L2 do x := sqrt(N + D*y^2);
if type(x, integer) then sols := sols union {[x, y]};
if (x^2 + D*y^2) mod N <> 0 or (2*x*y) mod N <> 0 then sols := sols union {[-x, y]};
end if;
end if;
end do;  return sols;
end proc:
This procedudure fails; I don't see why. Thank you for your help.

How do I plot a histogram with a labelled legend i...

I upgraded to Maple 2022 and some of my old sheets from Maple 2021 don't work anymore. When I plot a histogram with a legend I get an error saying: Error, invalid input: Statistics:-Histogram expects value for keyword parameter legend to be of type list, but received data set 1.

OK so maybe Histogram changed in 2022 although I didn't think it did. I ran it in Maple 2021 and I received no such error message. I chose to comply with the error message and the plot is output without an error message, however the legend labels carry extra characters I don't want to be there.  My attempt at a solution was to first use square brackets to make the object a list, then use the typeset command to typeset the label.  Strangely, the typeset command was not recognized.

What am I doing wrong? All I want is to plot a histogram with a legend labelled by a string which I have done many times in the past. I have attached below, a maplesheet which explicitly shows the problematic behaviour.

Thanks,
N

Define Random Variable

 (1)

Sample that variable and plot a histogram.

Maple 2022 as opposed to Maple 2021 does not consider this a valid way to define the legend. It want's it defined in a list as requested in the pink error message.

Maple 2022 as opposed to Maple 2021 does not consider this a valid way to define the legend. It works fine in Maple 2021. Maple 2022, want's it defined in a list. This works but, the square brackets and quotation marks appear when I don't want them to. The legend shouldn't have these extra quotations and brackets, just the desired name.

I tried the typeset command. It doesn't seem to be recognized anymore.

What am I doing wrong? All I want is to plot a histogram with a legend labelled by a string.

dsolve for system of 3 real eqs returns solution w...

I want to solve a system of 3 simple real linear odinary differential equations.

The solution using dsolve has some extra imaginary terms with very small (10^-10) coefficients.   How to I get just the real part of the solution.

Here is an example code:

v1 := 1;
v2 := 0.5;
k := 0.12;
p1 := 0.328;
p2 := 0.74;
l1 := 0.31;
l2 := 1.16;
sysode := diff(Cp(t), t) = -(p1 + p2 + k)*Cp(t) + l1*C1(t) + l2*C2(t), diff(C1(t), t) = (p1*Cp(t) - l1*C1(t))/v1, diff(C2(t), t) = (p2*Cp(t) - l2*C2(t))/v2;
ics := Cp(0) = 0.347, C1(0) = 0., C2(0) = 0.;
sol := convert(dsolve([sysode, ics]), float);

The method of simple iterations...

Hello everybody!! Can you please help me figure it out. I wrote the code, but for some reason I have an infinite loop going on, it counts normally to the cycle, as the cycle reaches, then everything is infinite

```restart;
with(plots):
f:=unapply(2*x-4*cos(x)-0.6,x); #the equation itself
f1:=unapply(diff(f(x),x),x); #its derivative
a:=-0.5; b:=1.5; eps:=0.001: #interval and accuracy

phi:=unapply((4*cos(x)-0.6)/2,x); #solving the equation with respect to x
x[0]:=1; #I take any point from the interval
x[1]:=evalf(phi(x[0]));
L:=evalf(abs(phi(b)-phi(a))/abs(b-a));
L1:=evalf(abs(phi(x[1])-phi(x[0]))/abs(x[1]-x[0]));
psi:=unapply(abs(diff(phi(x),x)),x);
plot([psi(x),1],x=a..b,color=[red,green]);

n:=1:
while abs(evalf(x[n]-x[n-1])) > eps do
n:=n+1:
x[n]:=evalf(phi(x[n-1]));
od;
fsolve(f(x)=0,x=a..b);```

Help with assumptions and complex numbers...

I'm trying to solve a coupled inductor problem.  All I'm trying to do is solve for the currents (which I could do), then solve for resonance by setting the imaginary part of I1 to 0 and solving for omega.  I then want to plug this resonant frequency back into I1 and evaluate it for some component values and coupling coefficient.

The problem is that even though I define the various variables as real,  Maple doesn't seem to recognize them as such.  I suspect I've failed to define one of them, and that is why it is responding like it is, but I can't find it.

I'm also getting some weird behavior.....for example if I type :  wres0, I get the value I assigned to it --that's fine.  But then, when I type : wres0/(2*pi), I get an error, "Error, unable to parse 'mverbatim"   --- what does this mean?

This should be a pretty straight forward calculation on Maple, but at this point, I think I may be better off doing it by hand!  I appreciate any help you can provide.  Thank you.

Counting how many polynomials are in specific Galo...

Hello :)

So what I was trying to find Galois group for quartic polynomials in a form f=x^+a_3*x^3+a_2*x^2+a_1*x+a_0, where 0<=a_i<=2 and a_0 <>0. I get polynomials and galois groups - that's not an issue. Lets say I specifically need polynomials with group D_4 so I run script

restart;
A := {seq(0 .. 2)};
A0 := A minus {0};
m := numelems(A)^3*(numelems(A) - 1);
a := Iterator:-CartesianProduct(A0, A \$ 3);
s := seq(x^4 + add(v[i]*x^(i - 1), i = 1 .. 4), v = a);
for k to m do
if irreduc(s[k]) = 'true' then print(f[k] = s[k], galois(s[k])); end if end do;

This one gives all list of polynomalias and their galois group.

for k to m do
if irreduc(s[k]) = 'true' then if galois(s[k]) = ("4T3", {"D(4)"}, "-", 8, {"(1 3)", "(1 2 3 4)"}) then print(f[k] = s[k], galois(s[k])); end if; end if;
end do;

This one gives me a list of D_4 specifically.
When 0<=a_i<=2 - there are not many polynomials so I cant count it by hand, but if I make a sequence larger there are too many polynomials to count them manually. So the question is how to count how many polynomials there are with a group D_4? Or lets say how do I count how many polynomials are in each group?
Thank you

voltage-current-voltage circuit ...

v2i2v_circuit.msim

I try to design a circuit to make a voltage-current-voltage translation. In my assumption, probe1.v is equal to probe2.v and it will generate a current(probe2.v / R4) through NMOS. The NMOS acts as a closed switch. Probe3.v is equal to CV3 and i can get "Probe4.v = CV1 + CV3". However, when the circuit operates, probe3.v isn't equal to CV3 and probe1.v isn't equal to probe2.v. I have tried to rise the differential input resistance and differential amplifier to make the Uin+ close to Uin- in op amp, but it doesn"t work effectively.
In addition, the closed resisitance of NMOS is also taken into consideration and i try to make it pretty below Kohm.

Could you help me fix the problem?

Please help me solve the following problem about complex numbers with Maple: w= (3+zi)/(2+z) whose geometric representation in the "oxy" plane is a straight line. Calculate module of z. Thank you so much.

How to produce a graph of a numbers sequence...

Hi,

I have a code (see below) for the following number sequence and want to produce a graph as well as the numerical data, please advise how to do it.

Sequence definition: Lexicographicaly least sequence of nonnegative integers commencing 1,3,5,7 such that any four  consecutive terms are mutually coprime.

The code I have so far is:

ina := proc (n) false end :

a := proc (n) option remember; local k;

if n < 5 then k := 2*n-1

else for k from 2 while ina(k) or igcd(k, a(n-1)) <> 1 or igcd(k, a(n-2)) <> 1 or igcd(k, a(n-3)) <> 1

do  od

fi; ina(k) := true; k

end proc;

seq(a(n), n = 1 .. 100);
1, 3, 5, 7, 2, 9, 11, 13, 4, 15, 17, 19, 8, 21, 23, 25, 16, 27,

29, 31, 10, 33, 37, 41, 14, 39, 43, 47, 20, 49, 51, 53, 22, 35,

57, 59, 26, 55, 61, 63, 32, 65, 67, 69, 28, 71, 73, 45, 34, 77,

79, 75, 38, 83, 89, 81, 40, 91, 97, 87, 44, 85, 101, 93, 46,

95, 103, 99, 52, 107, 109, 105, 58, 113, 121, 111, 50, 119,

127, 117, 62, 115, 131, 123, 56, 125, 137, 129, 64, 133, 139,

135, 68, 143, 149, 141, 70, 151, 157, 153

I have tried listplot but for some reason cant get the correct format

Hope you can help

Best regards

David.

non linear system of equation...

eqs.mw

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 >
 (13)
 >
 >
 (14)

 >
 (15)
 >

#im tryin to solve 9 equation having 9 varibales but the fsolve doesnt solve for C1 to R4, what i am doing wrong??

 First 247 248 249 250 251 252 253 Last Page 249 of 2353
﻿