Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I find thus equation of course i use a little bit seperation by hand, i have 11 equation but i can't get results of parameters i don't know why my code is a little bit old i think and i don't know there is another technique for finding them or not here is the file of mp, thanks for any help

F_P_Correct.mw

for apear each part  remove (:)

Change the length of the pendulum to achieve the analysis of the pendulum frequency change, but I scan the frequency of the two images do not correspond to each other, what is the problem?

sweep.mw

I need to automatically extend or truncate a colour list to suit number of points in plottools:-point plot.
extending the list the colour sequence could be repeated or if the is too awkard just add black.
I can't figure out how to select the list of colours to put into a new list to modify.

This will be inside a plotting procedure.

restart

with(ListTools)

[BinaryPlace, BinarySearch, Categorize, Classify, Collect, Deal, DotProduct, Enumerate, FindMaximalElement, FindMinimalElement, FindRepetitions, Flatten, FlattenOnce, Group, Interleave, InversePermutation, Join, JoinSequence, LengthSplit, MakeUnique, Occurrences, Pad, PartialSums, Reverse, Rotate, Search, SearchAll, SelectFirst, SelectLast, Slice, Sorted, Split, Transpose, Unpermute]

(1)

L:=[[1,2],[3,4],[-5,6],[-3,-2]]

[[1, 2], [3, 4], [-5, 6], [-3, -2]]

(2)

qty:=nops(L)

4

(3)

styles:=[symbol=solidcircle,colour=[red,green,blue,orange],symbolsize=12]

[symbol = solidcircle, colour = [red, green, blue, orange], symbolsize = 12]

(4)

 

plots:-display(plottools:-point(L,styles[]))

 

#Need to extend or truncate the list of colours to match the number of points
#styles can be copied to styles 1,2 etc
#the extended list would be a repeatition of the colour sequence given
#would need to look for color or colour;

has(styles,colour); #how to select colour our into a seperate list?

true

(5)

#too few point for the colours;
L1:=[[1,2],[3,4],[-5,6]]

[[1, 2], [3, 4], [-5, 6]]

(6)

plots:-display(plottools:-point(L1,styles[]))

Error, (in Plot:-Structure:-Points) number of colors must match number of points

 

#too many point for the colours;
L2:=[[1,2],[3,4],[-5,6],[-3,-2],[6-1],[0,1]]

[[1, 2], [3, 4], [-5, 6], [-3, -2], [5], [0, 1]]

(7)

plots:-display(plottools:-point(L2,styles[]))

Error, (in plottools:-point) incorrect arguments for creating points structure, try providing the dimension option

 
 

 

Download 2024-09-06_Q_Extend_or_Truncate_List_of_Colours.mw

Hello

in this example Untitled.mw Maple 2022 on MacOs  'finds' a minimum bigger than the maximum.

It looks like something is wrong...

Best Nicola

How do I mute the action of an accent applied to a symbol so that the accented symbol is itself an inert object? See the attached example.

How_do_I_make_an_accented_symbol_inert.mw
 

As a newbie in Maple2024, my next step is to try to solve a Diophantine equation. Attempts with isolve failed. It is the famous task B3 from the IMO of 1988:

If for integers x and y the fraction (x^2+y^2)/(1+x*y) is a positive integer, then it is actually a square number.

The solution is well known. But I would like to learn how to use Maple using this example and would like some advice.

Best regards, Alfred_F

I was trying to odetest one of my solutions to this ode when I got this internal Maple error I have not seen before.

Is this a legitimate error? my solution could be wrong ofcourse but strange to get internal error in this case.

Does this happen on earlier versions of Maple?

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1798 and is the same as the version installed in this computer, created 2024, August 29, 14:22 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

sol:=Intat(1/(u^n/((1/((a*g(x)+b)^n)/(f(x)^n)*diff(g(x),x)*f(x))^(-n-1))/((f(x)*diff(g(x),x))^(-2*n+1))/((1/((a*g(x)+b)^n)/(f(x)^n)*diff(g(x),x)*f(x)*(diff(f(x),x)*diff(g(x),x)+f(x)*diff(diff(g(x),x),x))-(-1/((a*g(x)+b)^n)/(f(x)^n)*diff(g(x),x)^2*f(x)*n*a/(a*g(x)+b)-1/((a*g(x)+b)^n)/(f(x)^n)*diff(g(x),x)*n*diff(f(x),x)+1/((a*g(x)+b)^n)/(f(x)^n)*diff(diff(g(x),x),x)*f(x)+1/((a*g(x)+b)^n)/(f(x)^n)*diff(g(x),x)*diff(f(x),x))*f(x)*diff(g(x),x)-f(x)*diff(f(x),x)/((a*g(x)+b)^n)/(f(x)^n)*diff(g(x),x)^2*n)^n)/(n^(-n))-u+1),u = a/f(x)/(a*g(x)+b)*y(x))-ln(a*g(x)+b)+_C1 = 0;

Intat(1/(u^n/(((diff(g(x), x))*f(x)/((a*g(x)+b)^n*f(x)^n))^(-n-1)*(f(x)*(diff(g(x), x)))^(-2*n+1)*((diff(g(x), x))*f(x)*((diff(f(x), x))*(diff(g(x), x))+f(x)*(diff(diff(g(x), x), x)))/((a*g(x)+b)^n*f(x)^n)-(-(diff(g(x), x))^2*f(x)*n*a/((a*g(x)+b)^n*f(x)^n*(a*g(x)+b))-(diff(g(x), x))*n*(diff(f(x), x))/((a*g(x)+b)^n*f(x)^n)+(diff(diff(g(x), x), x))*f(x)/((a*g(x)+b)^n*f(x)^n)+(diff(g(x), x))*(diff(f(x), x))/((a*g(x)+b)^n*f(x)^n))*f(x)*(diff(g(x), x))-f(x)*(diff(f(x), x))*(diff(g(x), x))^2*n/((a*g(x)+b)^n*f(x)^n))^n*n^(-n))-u+1), u = a*y(x)/(f(x)*(a*g(x)+b)))-ln(a*g(x)+b)+_C1 = 0

ode:=diff(y(x),x)-f(x)^(1-n)*diff(g(x),x)*y(x)^n/((a*g(x)+b)^n)-diff(f(x),x)*y(x)/f(x)-f(x)*diff(g(x),x) = 0;

diff(y(x), x)-f(x)^(1-n)*(diff(g(x), x))*y(x)^n/(a*g(x)+b)^n-(diff(f(x), x))*y(x)/f(x)-f(x)*(diff(g(x), x)) = 0

odetest(sol,ode,y(x));

Error, (in PDEtools/NumerDenom) invalid input: PDEtools/NumerDenom expects its 1st argument, ee, to be of type Or(algebraic,table,rtable), but received {Intat(1/(u^n*(f(x)^(1-n)*diff(g(x),x)*(a*g(x)+b)^(-n))^n*(f(x)*diff(g(x),x))^(2*n)*n^n-u*(a*g(x)+b)^n*f(x)^n*(a*n*f(x)^(2-n)*diff(g(x),x)^3*(a*g(x)+b)^(-n-1))^n+(a*g(x)+b)^n*f(x)^n*(a*n*f(x)^(2-n)*diff(g(x),x)^3*(a*g(x)+b)^(-n-1))^n),u = _Z) = Intat(1/(u^n*(f(x)^(1-n)*diff(g(x),x)*(a*g(x)+b)^(-n))^n*(f(x)*diff(g(x),x))^(2*n)*n^n-u*(a*g(x)+b)^n*f(x)^n*(a*n*f(x)^(2-n)*diff(g(x),x)^3*(a*g(x)+b)^(-n-1))^n+(a*g(x)+b)^n*f(x)^n*(a*n*f(x)^(2-n)*diff(g(x),x)^3*(a*g(x)+b)^(-n-1))^n),u = _Z)}

 

 

Download internal_error_PDEtools_NumerDenom_sept_4_2024.mw

Is there a way to re-index an existing dataframe? See attachment for example.

how_do_i_re-index_a_dataframe.mw

So I have this Maple document that I worked on yesterday, and now when I open it it just opens as the start-up screen where I can choose between document and worksheet mode. I can see that the file is much larger (900 kb) than an empty document, so it should definitely have the data still in there, but opening it with a text editor I couldn't manage to fix my issue. Does anyone have any tips? I have a back-up of the file (from the restore backup menu), but most of the content is not there, so it would be very helpful to get this one fixed.

Exercises.mw
Thanks in advance, 
Kristian.

The problem arose while playing with inscribed circles, as in this post. If anyone is interested, try to find a circle of maximum radius inscribed between the curves
x1^2 + 2*x2^2 - 1 = 0 and (x1 - sin(x1))^2 + (x2 - sin(x2))^2 - 1 = 0.

Curve graphs.

 

By using the second order ODE and its solution how i can get thus changing Rule?  i am looking for equation (8) by assumption of the paper he did, there is a trick but i don't know

 

idea.mw

I see here 
https://mathematica.stackexchange.com/questions/306634/how-can-i-use-dihedralangle-to-get-correct-result/306638?noredirect=1#comment751373_306638

Let $S.ABCD$ be a pyramid, $ABCD$ is a square with $AB = 1$. The line $SA$ perpendicular to the plane $ABC$. 

Calculate dihedral angle of two halfplanes `SBC` and `SCD` if: $SA = 1$, $SA = \dfrac{\sqrt{2}}{2}$.  I tried
restart;
with(Student:-MultivariateCalculus);
a := 1;
h := 1;
pA := [0, 0, 0];
pB := [a, 0, 0];
pC := [a, a, 0];
pD := [0, a, 0];
pS := [0, 0, h];

I am attempting to obtain an equation for battery discharge.

I have data from a battery that will supply 25 amps for 210 minutes. I want to fit this to an equation and then try to adjust the curve to match a battery that will supply 25 amps for 160 minutes.

Here is what I have:

restart; with(Statistics):

## Amps
A := Vector([444, 218, 74,312/10,209/10,119/10,625/100]):
## Time until battery discharges to 10.5 volts
T := Vector([5,15,60,3*60,5*60,10*60,20*60]):
f := x -> a*exp(1-x/b); f(x)
eqset := {seq(T[idx] - f(A[idx]), idx=1..7)}
sol := NonlinearFit(a*exp(1-x/b),A, T, x)
evalf(subs(x=A[6],sol))
P1 := plot(A,T): P2 := plot(sol,x=0..450): plots[display]({P1,P2})

I want the 'knee' of the fitted curve to more closely match the measured data.

How do I do this?

Dear Power Users, Dataframes are a powerful tool within Maple. However, when I have 'undefined' in cells "Aggregate" or "DataSummary" does not provide answers. However, when I use "Statistics:-Mean" with the additional option "ignore=true" I can get an answer for one column (see attached worksheet). Adding "ignore" to aggregate apparently does not work. What is the method for ignoring the undefined data? In Excel when a cell is blank it will be ignored. Thank you for any help given.MP_Aggregate.mw

From a discussion about expanding unit expressions with compound units I concluded that expanding derived units such as Newton, Watt, Volt, Tesla,... to SI base units is difficult in Maple.

Unintentionally, I came across a rather simple solution for SI units.

toSIbu := x -> x = Units:-Unit(simplify(x/Unit('kg'))*Unit('kg'));

converts derived SI units to SI base units. It’s the inverse of what the units packages and simplify do (i.e. simplification to derived units).

What makes it maybe more interesting: It also works, again unintentionally, on other units than SI units. If, one day, you come along an erg or a hartree or or a kyne and you cannot guess the SI units convert/units needs, try

toSIbu(Unit('pound'));
toSIbu(Unit('hp'));
toSIbu(Unit('electron'));
toSIbu(Unit('hartree'));
toSIbu(Unit('bohr'));
toSIbu(Unit('barye'));
toSIbu(Unit('kyne'));
toSIbu(Unit('erg'));
toSIbu(Unit(mile/gal(petroleum)));

Maybe handy one day when you do not trust AI or the web.


 

NULL 

toSIbu := x -> x = Units:-Unit(simplify(x/Unit('kg'))*Unit('kg')):
toSIbu(Unit('N'));
toSIbu(Unit('J'));
toSIbu(Unit('W'));
toSIbu(Unit('Pa'));
toSIbu(Unit('C'));
toSIbu(Unit('F'));
toSIbu(Unit('S'));
toSIbu(Unit('H'));
toSIbu(Unit('T'));
toSIbu(Unit('V'));
toSIbu(Unit('Wb'));
toSIbu(Unit('Omega'));
toSIbu(Unit('lx'));
toSIbu(Unit('lm'));
toSIbu(Unit('degC'));
toSIbu(Unit('rad'));
toSIbu(Unit('sr'));

Units:-Unit(N) = Units:-Unit(m*kg/s^2)

 

Units:-Unit(J) = Units:-Unit(m^2*kg/s^2)

 

Units:-Unit(W) = Units:-Unit(m^2*kg/s^3)

 

Units:-Unit(Pa) = Units:-Unit(kg/(m*s^2))

 

Units:-Unit(C) = Units:-Unit(A*s)

 

Units:-Unit(F) = Units:-Unit(A^2*s^4/(m^2*kg))

 

Units:-Unit(S) = Units:-Unit(A^2*s^3/(m^2*kg))

 

Units:-Unit(H) = Units:-Unit(m^2*kg/(A^2*s^2))

 

Units:-Unit(T) = Units:-Unit(kg/(A*s^2))

 

Units:-Unit(V) = Units:-Unit(m^2*kg/(A*s^3))

 

Units:-Unit(Wb) = Units:-Unit(m^2*kg/(A*s^2))

 

Units:-Unit(`Ω`) = Units:-Unit(m^2*kg/(A^2*s^3))

 

Units:-Unit(lx) = Units:-Unit(cd/m^2)

 

Units:-Unit(lm) = Units:-Unit(cd)

 

Units:-Unit(`°C`) = Units:-Unit(K)

 

Units:-Unit(rad) = Units:-Unit(m/m(radius))

 

Units:-Unit(sr) = Units:-Unit(m^2/m(radius)^2)

(1)

NULL


 

Download toSIbu.mw


(All done with Maple 2024 without loading any package)

 

 

 

First 11 12 13 14 15 16 17 Last Page 13 of 2153