Hnx

20 Reputation

One Badge

7 years, 68 days

MaplePrimes Activity


These are replies submitted by Hnx

@Giorgios, Preben

Thank you very much to the two of you. I must look into the matter next monday. It is already late here in Switzerland.

Best regards   Heinz

Thank you very much, Giorgios! This mistake of mine was stupid. It happened because the code I posted is a portion of a larger file and in this larger file the plot-call figures in the first line. With copy-paste it went forgotten.

ODEplot works fine now. I am continuing with my work.

Question: I would like to look into the code of 'rkf45' in order to add a break condition. Why does the following not work?

 

restart; with(VariationalCalculus); with(PDETools); interface(verboseproc = 2); print(x_rkf45)

x_rkf45

(1)

``


 

Download Befehle_interface_verboseproc_print_2020-06-06.mw

With 'sin' it works.

Regards Heinz

Hi Rouben! Thank you very much for your hint! Just learned a thing more about wonderful Maple. Regards   Heinz

@acer Hi acer! Thank you for the hint which I will heed of course. This is my first day in the forum and I still have much to learn.  Heinz

Tom, you have been a great help for me. Thank you so much! I have wondered where the additional argument (t) comes from, see below. When composing the ODE (4) all of a sudden there appears phi1(t)(t) instead of phi1(t). This is the reason why it did not work (apart from the undeclared variable g which you found. I cannot explain this. Can you? By the way, it already happens with the command subs, see arcsin.
 

Trebuchet, Phase I, 2020-05-27 Ki

 

restart; with(RealDomain); assume(h < r1); additionally(h < r2)

hz1 := g*(r3*m3*cos(phi1(t))-r1*m2*sin(phi2(t))/sin(phi2(t)-phi1(t)))/theta3

g*(r3*m3*cos(phi1(t))+r1*m2*sin(phi2(t))/sin(-phi2(t)+phi1(t)))/theta3

(1)

hz2 := phi1(t)+arcsin((h+r1*sin(phi1(t)))/r2)

phi1(t)+arcsin((h+r1*sin(phi1(t)))/r2)

(2)

hz3 := subs(phi2 = hz2, hz1)

g*(r3*m3*cos(phi1(t))+r1*m2*sin((phi1(t)+arcsin((h+r1*sin(phi1(t)))/r2))(t))/sin(-(phi1(t)+arcsin((h+r1*sin(phi1(t)))/r2))(t)+phi1(t)))/theta3

(3)

deq := diff(phi1(t), t, t)-hz3 = 0

diff(diff(phi1(t), t), t)-g*(r3*m3*cos(phi1(t))+r1*m2*sin((phi1(t))(t)+(arcsin((h+r1*sin(phi1(t)))/r2))(t))/sin(-(phi1(t))(t)-(arcsin((h+r1*sin(phi1(t)))/r2))(t)+phi1(t)))/theta3 = 0

(4)

 

NULL


 

Download Unerwartete_(t)_wenn_subs-Befehl_2020-05-27.mw

Tom, thank you so much! As you can see, your hint came handy. Unfortunately my ODE is more complicated, see below. When dsolve is executed I get the following error message which I do not understand:

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

Is my syntax wrong? Where?

Additional question: Why don't you use 2D-math?

Regards  Heinz

 


 


 

restart; with(plots)

deq := diff(phi1(t), t, t)-g*(r3*m3*cos(phi1(t))+r1*m2*sin((phi1(t))(t)+arcsin((h+r1*sin(phi1(t)))/r2))/sin(-(phi1(t))(t)-arcsin((h+r1*sin(phi1(t)))/r2)+phi1(t)))/theta3 = 0

deq_numeric := subs(r1 = 8, r2 = 8, r3 = 1, h = 5, m2 = 1, m3 = 20, theta3 = 20, deq)

ics_numeric := phi1(0) = 0, (D(phi1))(0) = -.63

hz1 := dsolve({ics, deq_numeric}, phi1(t), numeric)

``


 

Download Kondensierte_Form_Phase_I_2020-05-27.mw

@Carl Love I did not want to be disrepectful and was myself very unhappy how my Maple code was represented! But I did not find a way to copy the code into the window. If there is a way to do it please advice. Regards  Heinz

PS. This is my first time that I use this forum.

1 2 Page 2 of 2