janhardo

860 Reputation

12 Badges

11 years, 254 days
B. Ed math

MaplePrimes Activity


These are questions asked by janhardo

 

"restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"NULL

"maple.ini in users"

 

3

(1)

NULL#  plot  solutions to a system  of DEs

NULL

sys := {diff(x(t), t) = y(t), diff(y(t), t) = -x(t) - 1/2*y(t)}

{diff(x(t), t) = y(t), diff(y(t), t) = -x(t)-(1/2)*y(t)}

(2)

DEplot(sys, [x(t), y(t)], t = 0 .. 15, [[x(0) = 1, y(0) = 0]])

 

;

This is not working, seems to be simple ...
Have made an attempt to create a procedure from these two commands, but no success
Apparently, I need to learn to use a debugger to determine what is wrong, then?

dv_systeemplot:= proc ( DV1,DV2 ,RV1,RV2 )
                 local t, sys,systeemplot;  
                 sys := {DV1 , DV2 }:
                 systeemplot:= DEplot(sys, [x(t), y(t)], t = 0 .. 15, [[RV1 , RV2]]);
                 return systeemplot;
end proc;

proc (DV1, DV2, RV1, RV2) local t, sys, systeemplot; sys := {DV1, DV2}; systeemplot := DEplot(sys, [x(t), y(t)], t = 0 .. 15, [[RV1, RV2]]); return systeemplot end proc

(3)

NULL

DV1 := diff(x(t), t) = y(t)

diff(x(t), t) = y(t)

(4)

DV2 := diff(y(t), t) = -x(t)-(1/2)*y(t)

diff(y(t), t) = -x(t)-(1/2)*y(t)

(5)

RV1 := x(0) = 1

x(0) = 1

(6)

RV2 := y(0) = 0

y(0) = 0

(7)

dv_systeemplot( DV1,DV2 ,RV1,RV2 );

 

Error, (in DEtools/DEplot/CheckDE) inputs must be ODEs

 

NULL

Ask AI to get some code: never i got the right Maple code ! :)

 

"restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"``
 

"maple.ini in users"

 

3

(8)

restart;

systeem := proc(eq1, eq2, beginwaarden)
  local x, y, oplossing;
  x := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t);
  y := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t);
  oplossing := DEplot([x(t), y(t)], t = 0 .. 10, beginwaarden);
  oplossing;
end proc;

# Definieer de differentiaalvergelijkingen
eq1 := diff(x(t), t) = y(t);
eq2 := diff(y(t), t) = -x(t);

# Geef de beginwaarden op
beginwaarden := [x(0) = 1, y(0) = 0];

# Roep de procedure aan met de differentiaalvergelijkingen en beginwaarden
systeem(eq1, eq2, beginwaarden);

"maple.ini in users"

 

proc (eq1, eq2, beginwaarden) local x, y, oplossing; x := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t); y := unapply(rhs(dsolve({eq1, eq2, beginwaarden}, {x(t), y(t)})), t); oplossing := DEplot([x(t), y(t)], t = 0 .. 10, beginwaarden); oplossing end proc

 

diff(x(t), t) = y(t)

 

diff(y(t), t) = -x(t)

 

[x(0) = 1, y(0) = 0]

 

Error, (in dsolve) invalid input: PDEtools/sdsolve expects its 1st argument, SYS, to be of type Or(set({`<>`, `=`, algebraic}),list({`<>`, `=`, algebraic}),`casesplit/ans`(list,list)), but received {diff(x(t),t) = y(t), diff(y(t),t) = -x(t), [x(0) = 1, y(0) = 0]}

 

Probably i do need to work with a debugger here?


Download dv_systeem_via_mapleprimes_.mw

Well , honestly I can't make sense of how to do this.

Interactive can be done step by step , but now generalize via a procedure , but can't get a handle on it
How to get the right procedure ?

"maple.ini in users"

(1)

NULL

" restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"

"maple.ini in users"

 

3

(2)

DV := y(x)*(diff(y(x), x)) = exp(x)

y(x)*(diff(y(x), x)) = exp(x)

(3)

opl_1 := dsolve({DV, RV1}, y(x))

y(x) = (1-2*exp(1)+2*exp(x))^(1/2)

(4)

opl_2 := dsolve({DV, RV2}, y(x))

y(x) = -(1-2*exp(1)+2*exp(x))^(1/2)

(5)

opl := plot({rhs(opl_1), rhs(opl_2)}, x = 0 .. 5, y = -10 .. 10, thickness = 3)

lijnelement := dfieldplot(DV, y(x), x = 0 .. 5, y = -10 .. 10, title = "lijnelementveld met intergaalkromme door (1,1)(1,-1)")

display({opl, lijnelement})

 

NULL

" restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ;"

"maple.ini in users"

 

3

(6)

NULL

DV, RV1, RV2

y(x)*(diff(y(x), x)) = exp(x), y(1) = 1, y(1) = -1

(7)

``

NULL

NULL

"restart: with(plots):with(DEtools):with(Student[ODEs]):infolevel[Student]:=3 ; "

"maple.ini in users"

 

3

(8)

DVplot:=proc(DVA,RV1A,RV2A)
          local DV;RV1;RV2;opl_1;opl_2;opl;lijnelement;
          DV:
          RV1:
          RV2:
          opl_1 := dsolve({DV, RV1}, y(x)):
          opl_2 := dsolve({DV, RV2}, y(x)):
          opl:= plot({rhs(opl_1), rhs(opl_2)}, x = 0 .. 5, y = -10 .. 10, thickness = 3):
          lijnelement:=dfieldplot(DV, y(x), x = 0 .. 5, y = -10 .. 10, title = "lijnelementveld met                intergaalkromme door (1,1)(1,-1)"):
          display({opl, lijnelement});
end proc:

NULL

DVA := y(x)*(diff(y(x), x)) = exp(x)

y(x)*(diff(y(x), x)) = exp(x)

(9)

RV1A := y(1) = 1

y(1) = 1

(10)

RV2A := y(1) = -1

y(1) = -1

(11)

DVplot(DVA, RV1A, RV2A)

Error, (in dsolve) not a system with respect to the unknowns [y(x)]

 
 

NULL

Download DV_plotten-_procedure.mw

I have here a function  
                           "sin(x)/x"

and suppose sin(x)/x = 0 
Can I now use MapleAI to retrieve the correct command for this in Maple..could I?

The intersection points with the x-axis are positive and negative multiples of Pi
I have put these in an ordered list, but Maple gives this:
For x domain = -20...20 
X := {x = Pi}, {x = 2*Pi}, {x = 3*Pi}, {x = 4*Pi}, {x = 5*Pi}, {x = 6*Pi}, {x = -6*Pi}, {x = -5*Pi}, {x = -4*Pi}, {x = -3*Pi}, {x = -2*Pi}, {x = -Pi};

 
X := sort(eval~(x, [X]));
 X := [, -6 Pi, -5 Pi, -4 Pi, -3 Pi, -2 Pi, -Pi, 2 Pi, 3 Pi, 4 Pi, 5 Pi, 6 Pi]


A strange ranking that Maple comes up with ? 

with(NaturalLanguage);
        [Explain, GetCommand, GetMath, Query, RawQuery]



GetCommand("give for Maple solve command all options?");
            "solve(equations, variables, options);"

Explain("give for Maple solve command all options?");

"Maple is a symbolic and numeric computing environment. Its 

   "solve" command is used to find solutions (roots) of a given 

   equation or a system of equations.
  

  There are a number of options (or "parameters") which can be 

   specified in this command to alter its behavior:

  

  1. `Allsolutions`: This option makes Maple to generate all 

   possible solutions of an equation.

  

  2. `Real`: This option only provides the real solutions. If 

   equations do not have real solutions, it will return an 

   empty set.

  

  3. `Positive`: It only includes positive solutions in the 

   output.

  

  4. `explicit`: If specified, Maple attempts to isolate roots 

   and provide an explicit solution for each variable.

  

  5. `assume = real`: This option restrict the solutions to 

   only real numbers.

  

  6. `parametric`: This option allows Maple to write the 

   solutions in a parametric form. 

  

  7. `avoid ={x = a}`: This option makes solve exclude the 

   possibility `x = a` as a solution.

  

  8. `MaxDegree = d`: This option allows you to limit the 

   degree of the polynomial equations to be considered.

  

  9. `maxdepth = d`: This sets a limit on recursive depth to 

   which the computation should go to seek a solution.

  

  10. `multiplicities`: This option reports multiplicity of the 

   roots.

  

  11. `solutions = vars`: This option tells Maple to look for 

   solutions for specific variables.

  

  12. `numeric`: This option makes solve find a numeric 

   solution to the equation.

  

  13. `symbolic`: This option makes solve find a symbolic 

   solution to the equation.

  

  14. `simplify`: This option simplifies the solutions returned 

   by solve.

  

  15. `sqrt`: This option allows square roots in the output.

  

  It is important to note that not all options are suited for 

   use with all types of equations. Also, the "solve" command 

   in Maple can be occasionally limited by the complexity of 

   the equation, and may sometimes fail to find solutions that 

   more specialized software or methods can find."



 

 

I want to have a 14 larger font instead of Times New Roman 12 for the whole worksheet or else a different font later. 
Can't make sense of how this is all organized in Maple 
You would say set a template , but ?

For Mathematica  math software app,there is a plugin to use in chatGPT pro ( paid subscription ) and maybe this can be done for Maple too ? 

Haven't used the plugin for Mathematica yet, am curious about it.
Let me have the AI look at the Riemann Hypothesis :)  
Have a few books on it, but can't get through that math with all those special functions.

3 4 5 6 7 8 9 Last Page 5 of 23