MaplePrimes Questions

chatGPT version used by the new NaturalLanguage package seems to be using chatGPT 3?. I asked it and this what it said

NL:=NaturalLanguage;
NL:-Query("what is your name?");
"As an Artificial Intelligence, I don't have a personal name. However, If 
you're asking how to represent the question \"What is your name?\" in MathML, 
it's actually irrelevant as MathML is used for marking up mathematical notations, 
not regular text or questions. \n\nBut in English, it's as simple 
as just asking \"What is your name?

Then I asked it 

NL:-Query("what version of chatGPT are you?");
"As an AI developed by OpenAI, I don't have a specific version like software 
programs or applications. I get continuous updates and improvements over time. 
However, as of my current operation, I'm based on GPT-3 model.

some questions: It is possible to make it use chatGPT 3.5 or 4.0 with NL?

How is this free to use and without getting a key from openAI? After agreeing to terms fromn the options menu, can one continue to use it for free? I thought chatGPT requires some fee to use. But I could be wrong.  but this is nice to be able to use it this easily from Maple!

Btw, It is still not very good in math. Asked it to first this simple first order ode and got wrong answer

NL:-Query("what is the solution to the differential equation y'(x)+y(x)=sin(x)");
"Sorry, this query was too complicated. Please rephrase and/or try again."

So I tried

NL:-Query("solve the differential equation y'(x)+y(x)=sin(x)");
"The differential equation given is a first order linear 

   ordinary differential equation. 

  

  The general solution can be obtained through the following 

   steps:

  

  1. Identify the homogeneous part of the equation, which is 

   y'(x) + y(x) = 0. The solution of such a homogeneous 

   equation known as the "complementary function" is y_c = 

   e^(-x) * A. where A is an arbitrary constant which will be 

   determined by a specific condition or boundary value.

  

  2. Find a Particular Integral (solution specific to the 

   nonhomogeneous part of the differential equation) which in 

   this case is y_p = -cos(x)

  

  3. Combine the Complementary function and Particular Integral 

   to get a general solution, y(x) = e^(-x) * A - cos(x).

  

  Now let's express the solution in MathML:"


                            (-x)          
                     y x = e     A - cos x

 "Note: Here A is a to-be-determined constant. If the problem 

    was a boundary value or initial value problem, you would 

    substitute the given values into this general solution and 

    solve it for A."


The solution should be

dsolve(diff(y(x),x)+y(x)=sin(x))

                y(x) = -cos(x)/2 + sin(x)/2 + exp(-x)*c__1

 

Any idea why parse("a", 'statement') doesn't return the value of the variable, but only its name?

Running the same command directly works.

Download ParseStatement.mw

Hello everyone!

I wanted maple to give me the conditions when my inequality is fulfilled. But maple gives me exactly the same conditions for x (x here as placeholder) >0 and x<0. That makes no sense. The conditions themselves for x>0 (x<0) are also contradictory and illogical. 

Can someone please explain the solutions or what is wrong? I assume that conditions for the inequality to be fulfilled are missing. But I wanted Maple to give me exactly these conditions. I always use the solve command for this.

Thank you very much!

Best wishes
Hahn 

Maple_Forum_Help_Inequalities.mw

I tried inserting contents of my worksheet here but for some reason procedure test2 does not appear. Therefore, here is a screenshot.

What I would like is for the call r() above to print out 3,2 and then 5.

Basically, I'd like to know how I can call a function that has default parameter values with a value that makes the function use the default parameter value.

In the code above, the variable r is assigned to the return value of test2, which is the function called "inner". The function inner accepts an argument "b" and calls the function "test" passing in this "b" as the second argument. If I don't pass any argument to "inner" then it defaults to Null, which then gets passed to "test".

I want this Null to force "test" to use its default value for parameter "b".

PS As an extra, why does it give a "not able to parse" error when we declare a local inside of a proc as above? Note that I have it commented out. 

Download Curry.mw

Hello

Beginning with a given real fraction, for example 1/12, I would like to find out the following information about its decimal number (here: 0.0833333...):

- decimal number up to period, here 0.08

- the period if exists, here 3

How to program that in Maple?

Thanks a lot for your help!

How 

Where does one find the python module "maple" used to access open maple as in https://www.maplesoft.com/support/help/maple/view.aspx?path=OpenMaple%2fPython%2fAPI ?

Hi:

In a plot title, I want  A^(1)(x) to appear - that is, the first derivative of the function A(x) with the "1" enclosed in brackets because that is the standard notation for derivatives of the special function A.

Alternatively, I'll be happy to use A'(x) - and I know that there are calculus characters on the pallet that are supposed to do that, but they all just become Diff and that is no good for other reasons.

So, here is the closest I've come:

Test:=plots[textplot]([3,3,typeset(A^[1],"(x)")]);

and that almost works, except if I change the [1] to (1), Maple tries to evaluate it as an expression and it disappears. If I change 1 to 2 it works fine, except I want the first derivative.

I've tried quotes, uneval, backquotes and all I get is an error or the quotes showing up as text.

Does anyone know how to do this?

Thank you.

I have the set A := {12, 17, 24, 28} and the set B := {358, 568}. I would like to do the combination (at least that is the name I think I should use) of the two sets to get the following result:

{12358, 12568, 17358, 17568, 24358, 24568, 28358, 28568}

As a bonus, if it's not too complicated, I would like the procedure to see that there are two numbers that have repeating number in them. In fact, the last two elements of the result, namely 28358  and 28568 has two 8. So those last two terms should not appear in the result. We should get only the 6 elements {12358, 12568, 17358, 17568, 24358, 24568}.

There are so many possibilities with Combination and Iterator that I am lost in how to do it. Maybe someone has had to do it before me and have an idea on how to do it.

Thank you in advance for your time.

Mario

For t not equal to nT,   

dS/dt = delta- mu*S+ omega*V; 

 dV/dt = -(omega+mu)*V

For t=nT, 

 S(nT+)=(1-gamma) S(nT);

V(nT+)=V(nT)+ gamma* S(nT),

with the initial conditions  S(0+)=s0

V(0+)=v0

    how to plot the graph with this system of equations,impulsive points and initial conditions  

Hello. In our math lessons, we are laerning about monotonicity within different graph and hereby, we are also working with making a line, describing when the graph is increasing or descreasing (I have uploaded a picture along to describe). 

I havent been able to find any easy way to make a monotonic line within maple, where i dont have to draw them in. This is problematic and will end up taking me a long time in each assignment where its needed. 
Kinds regrads. Samuel Hesselberg

Suppose I have to solve _Z^2 + (epsilon - 1)*_Z - epsilon + theta=0. If I use the code

solve(_Z^2 + (epsilon - 1)*_Z - epsilon + theta, _Z)

I get the solutions  as -epsilon/2 + 1/2 + sqrt(epsilon^2 + 2*epsilon - 4*theta + 1)/2, -epsilon/2 + 1/2 - sqrt(epsilon^2 + 2*epsilon - 4*theta + 1)/2

But I need them as (1 - epsilon)/2 + sqrt((epsilon + 1)^2 - 4*theta)/2, (1 - epsilon)/2 - sqrt((epsilon + 1)^2 - 4*theta)/2

How to modify the code so that I get the roots in the more simplified form, as I have mentioned above. 

Please help. 

Hello,

How I can show that the value of psi 1 through method #1 is equal to that one in method #2?

is possible to verify by analytic results, not using and placing parameter's numerical values?

show.mw

The link to OpenMaple/Python/Examples from https://www.maplesoft.com/support/help/maple/view.aspx?path=OpenMaple seems to be broken, but not sure where to report such an issue.  

I've been writing this code to simulate the orbit of Venus in a simple 2D polar plot, but it keeps telling me that I have insufficient initial conditions, here is the code:

restart:with(Physics):with(VariationalCalculus):with(plots):with(plottools):

R[V] := 0.72*AU: #`starting radius for venus`

AU := 1: #`astronomical unit`

G := 6.674*10^(-11): #`gravitational constant`

m[S] := (333*10^3)*m[E]: #`mass of the sun`

m[V] := 0.815*m[E]: #`mass of venus`

m[E] := 1: #`mass of the earth`

x[V] := t -> r[V](t)*cos(theta[V](t)): #`x-coordinate`

y[V] := t -> r[V](t)*sin(theta[V](t)): #` y-coordinate`

x[VP] := t -> diff(x[V](t), t): #` x-velocity`

y[VP] := t -> diff(y[V](t), t): #`y-velocity`

T[V] := m[V]*simplify(x[VP](t)^2 + y[VP](t)^2)/2: #`kinetic energy of the system`

V[V] := (-G)*m[V]*m[S]*1/r[V](t): #`potential energy of the system`

L[V] := T[V] - V[V]; #`lagrangian of the system`

EL[Vr] := diff(L[V], r[V](t)) - diff(diff(L[V], diff(r[V](t), t)), t) = 0: #` e-l for the r-coordinate`

EL[`Vtheta;`] := diff(L[V], theta[V](t)) - diff(diff(L[V], diff(theta[V](t), t)), t) = 0: #`e-l for the theta-coordinate`

EL[V] := [EL[Vr], EL[`Vtheta;`]]; #` system of equations`

F[V] := G*m[V]*m[S]*1/R[V]^2: #`gravitational force for venus starting position`

omega[V] := sqrt(F[V]*R[V]*1/m[V])*1/R[V]: #`angular velocity for venus starting position`

IC[V] := [r[V](0) = R[V], D(r[V])(0) = 0, theta[V](0) = 0, D(theta[V])(0) = omega[V]]; #`initial conditions, r-position, r-velocity, theta-position, theta-velocity`

SOL := dsolve(EL[V], IC[V], [r[V](t), theta[V](t)], numeric, output = listprocedure); #`numerical solution`

Error, (in dsolve/numeric/type_check) insufficient initial/boundary value information for procedure defined problem
 

I have included both the initial values for r,dr/dt, theta and dtheta/dt.

I'm not sure what other initial conditions I could be missing?

First 112 113 114 115 116 117 118 Last Page 114 of 2414