C_R

3627 Reputation

21 Badges

6 years, 136 days

MaplePrimes Activity


These are replies submitted by C_R

@acer
Now its clear. There is use for functional operators and unapply, which both can produce the same output.
Thank you for the detailed answer.

@acer 

Beautiful! Your answer anticipates a follow-up question.

However, I still haven't figured out why my "poor man's attempts" didn't work.
In the meantime I found that the arrow operator and unapply are treated differently.

Using unapply, my attempts can be fixed. 

for i from 1 to 5 do 
   x-> `^`(x,i);
   unapply(`^`(x,i),x);
end do;

But this is somehow not satisfying because up until now I thought unapply and -> are equivalent.  Aren't they?

x -> `^`(x, i);
unapply(`^`(x, i), x);
         proc (x) options operator, arrow; x^i end proc

         proc (x) options operator, arrow; x^i end proc

 

@acer Thank you. That makes sense.

An example of "the" equations would be helpful to better understand what you are trying to achieve

there are no determinants in your post

@Ronan 

The start page is another hard to reproduce trouble maker. Have you tried to disable it.

@acer Thanks for the 'Simple way' to check

What you are describing sounds very familiar to me (and I think I have even posted something here, that I cannot find straight away). It is most likely not a bug but related to Windows (7 and 10) and your personal setup.

A few questions:

What happens if you wait (for me Maple sometimes started after a few minutes)?

Any recent changes on your computer or network configuration?

Does Maple start always from the start menu (i.e. without double click on a file)

It is super annoying and not reproducible. For me it disappeared as it appeared several times over the past 5 years. I remember that this effect was more pronounced after a fresh system start-up. Also changing/ connecting/disconnecting networks seemed toplay a role.

PS.:My biggest suspicion at the moment is Java in combination with Windows.

@ That's what I get

An example would be helpfull.

Maple uses the method exact to solve the ode. Slighty better results can be obtained this way

factor(ode);
%*denom(lhs(%));
dsolve(%)

 

 

This way the first 5 solutions can be identified as the roots of the first term encricled in red. The sixth solution (in yellow) is now what we would expect since a different method (separable) was applied

 

Your original sixth solution is implicit which can be made explicit this way

simplify(isolate(diff(sol[6],x),diff(y(x),x)));dsolve(%)

I can't tell why Maple returns an implicit solution

@nm 

Interesting design decision that seems to save memory space, as no power statements are required in arithmetic expressions.

dismantle(a^b);

POWER(3)
   NAME(4): a
   NAME(4): b

 

@jganding 

This makes it a bit more generic

expr :=1* Unit('h');
evalf(convert(expr, 'unit_free'))*indets(expr, specfunc(Units:-Unit))[];

 

Do you have an example?

@SwissMapleBeginner 

You are welcome. Assuming that dharrs solution is what you want, I have added an extact and generic solution, that you can apply to any event in a piecewise fashion. Event by event you can not only redefine the ICs but also the (temperature dependend?) parameters of the ODEs. (Assembling from piecewise solutions a piecewise function for plotting is the better way for plotting as compared to plots,display.)

restart;

ode_sys:=diff(SA2(t),t)=SA1(t)*k12-SA2(t)*k21,
         diff(SA1(t),t)=-k1x*SA1(t);
ics:=SA2(t_ev)=0,SA1(t_ev)=Dose;

diff(SA2(t), t) = SA1(t)*k12-SA2(t)*k21, diff(SA1(t), t) = -k1x*SA1(t)

 

SA2(t_ev) = 0, SA1(t_ev) = Dose

(1)

sols:=dsolve({ode_sys,ics})

{SA1(t) = Dose*exp(-k1x*t)/exp(-k1x*t_ev), SA2(t) = -(-k1x*Dose*k12/(exp(-k21*t_ev)*(k1x-k21))+k21*Dose*k12/(exp(-k21*t_ev)*(k1x-k21)))*exp(-k21*t)/(k1x-k21)-Dose*k12*exp(-k1x*t)/((k1x-k21)*exp(-k1x*t_ev))}

(2)

params:=k12=0.0452821,k21=0.0641682,k1x=0.00426118;

k12 = 0.452821e-1, k21 = 0.641682e-1, k1x = 0.426118e-2

(3)

p:=subs(t_ev=1,Dose=484,params,sols)

{SA1(t) = 484*exp(-0.426118e-2*t)/exp(-0.426118e-2), SA2(t) = -365.8425407*exp(-0.641682e-1*t)/exp(-0.641682e-1)+365.8425406*exp(-0.426118e-2*t)/exp(-0.426118e-2)}

(4)

plot(rhs~(p),t=1..50);

 

 


 

Download Split_from_Event.mw

First 35 36 37 38 39 40 41 Last Page 37 of 72