janhardo

700 Reputation

12 Badges

11 years, 47 days

MaplePrimes Activity


These are replies submitted by janhardo

@janhardo 

There is new functionality for ODE solving
Is y(x) the same as P(t) ? see worksheeet.
And how to solve a differential equation with parameter t in the ODE (steps)

Question: is y(x) = P(t)    ?

 

Maple makes it easy to solve differential equations now in 2021 with the ODE(steps) .. great work.

-closed forms  solutions
- series forms  solutions

- transformation solutions 
As student you could see the steps and solving by hand in Maple 

 

Now only plotting the graph the solution or slopefield

The earlier question for a modern approach for solving differential equations is now be answered with this new ODE(step) functionality

No, its not because students still are doing the tasks by hand in Maple

restart;

with(Student:-ODEs);

[ChangeVariables, DifferentialOrder, Integrate, IntegratingFactor, IsolateHighestDerivative, LinearForm, ODEPlot, ODESteps, ReduceOrder, SeparateVariables, Solve, Test, Type]

(1)

 

 

verg:=diff(y(x), x) = k*y(x)^2 - y(x)/100:%;

diff(y(x), x) = k*y(x)^2-(1/100)*y(x)

(2)

ODESteps(verg);

"[[,,"Let's solve"],[,,(ⅆ)/(ⅆx) y(x)=k (y(x))^2-(y(x))/100],["•",,"Highest derivative means the order of the ODE is" 1],[,,(ⅆ)/(ⅆx) y(x)],["•",,"Separate variables"],[,,((ⅆ)/(ⅆx) y(x))/(k (y(x))^2-(y(x))/100)=1],["•",,"Integrate both sides with respect to" x],[,,∫((ⅆ)/(ⅆx) y(x))/(k (y(x))^2-(y(x))/100) ⅆx=∫1 ⅆx+_C1],["•",,"Evaluate integral"],[,,-100 ln(y(x))+100 ln(100 k y(x)-1)=x+_C1],["•",,"Solve for" y(x)],[,,y(x)=-1/((e)^(x/100+_C1/100)-100 k)]]"

(3)

------------------------------------------------- end --------------------------------------------------------

y(x) = -1/(exp(x/100 + _C1/100) - 100*k);

y(x) = -1/(exp((1/100)*x+(1/100)*_C1)-100*k)

(4)

 

====================Calculation made in Harald pleym  task==========================================

restart:

deq:=diff(P(t),t)=k*P(t)^2-1/100*P(t):%;

diff(P(t), t) = k*P(t)^2-(1/100)*P(t)

(5)

The equation is separable.

deq1:=deq/rhs(deq):%;

(diff(P(t), t))/(k*P(t)^2-(1/100)*P(t)) = 1

(6)

Integration gives

map(Int,deq1,t=0..T);

Int((diff(P(t), t))/(k*P(t)^2-(1/100)*P(t)), t = 0 .. T) = Int(1, t = 0 .. T)

(7)

eq:=map(factor,%):%;

Int(100*(diff(P(t), t))/(P(t)*(100*k*P(t)-1)), t = 0 .. T) = Int(1, t = 0 .. T)

(8)

Partial decomposition of

g:=100/(P(t)*(100*k*P(t)-1)):%;

100/(P(t)*(100*k*P(t)-1))

(9)

gives

g=convert(g,parfrac,P(t));

100/(P(t)*(100*k*P(t)-1)) = -100/P(t)+10000*k/(100*k*P(t)-1)

(10)

map(x->x*diff(P(t),t),(%));

100*(diff(P(t), t))/(P(t)*(100*k*P(t)-1)) = (-100/P(t)+10000*k/(100*k*P(t)-1))*(diff(P(t), t))

(11)

map(Int,%,t=0..T,continuous);# via Carl na foutmelding

Int(100*(diff(P(t), t))/(P(t)*(100*k*P(t)-1)), t = 0 .. T, continuous) = Int((-100/P(t)+10000*k/(100*k*P(t)-1))*(diff(P(t), t)), t = 0 .. T, continuous)

(12)

eq1:=rhs(%)=rhs(eq):%;

Int((-100/P(t)+10000*k/(100*k*P(t)-1))*(diff(P(t), t)), t = 0 .. T, continuous) = Int(1, t = 0 .. T)

(13)

value(%);

100*ln(P(0))-100*ln(100*k*P(0)-1)-100*ln(P(T))+100*ln(100*k*P(T)-1) = T

(14)

Substitution of the initial data yields

subs(P(0)=200,T=t,%);

100*ln(200)-100*ln(20000*k-1)-100*ln(P(t))+100*ln(100*k*P(t)-1) = t

(15)

P(t)=solve(%,P(t));

P(t) = -200/(20000*k*exp((1/100)*t)-exp((1/100)*t)-20000*k)

(16)

 

Download nieuw_in_maple_2021-ODE_steps_-vergeleken_met_populatie_dv_van_Harald_pleym.mw

@Kitonum 

I like this presentation of the graphs too, with this plot description, although its more work to achieve.

But it should be also not complicated to let the borders disappear as a option for Maplesoft developers ?

@Carl Love

Thanks

The function 
As solution from the differential equation is continuous 
At what stage we can see that P(t)(population notation) should be continuous from a given differential equation  ? 

Was there not a advisor function for classifying  differential equations 

@acer 

Thanks

"It seems to be some kind of duplication of your querying here"
In that information is nothing to find how to get a prime notation in maple plaintext input as i earlier determined.
As you mentioned before in your earlier post: it doesn't exist the prime notation for maple plaintext input.

@acer 

Thanks

I can remember differential equations in Maple  worksheet  who are showned the prime notation.

Could this be done via a alias ? 

@acer 

"3) A single apostrophe ' which comed from a key on a standard keyboard. This is used as a so-called unevaluation-quote in Maple. In 2D Input this can be used as the prime."

Yes, this is working in 2D 

y'=x -> solve DE  

But not for maple input yet?

How to plot the real part of the zeta function on the critical line in 2D /3D ?

This is a video explaining all Riemann zeta function - YouTube

Drawing a vertical plane at  x =1/2  on the real axis .

Can be helpful too : LMFDB - The L-functions and modular forms database
note: for people who can possible solve the riemann hypothese ?

@acer 

Thanks

Ah, i see 

Its first checking if the typesetprime setting has a value prime: yes or no 
Its not a default setting that prime=true

That you than can come up with this Differential equation  in a default worksheet.

y`= x ; 

@Carl Love 

Should also help to simplify  v more ..or doesn't matter ?

@janhardo 

Takes some time to get it working?

Typesetting:-Settings(typesetprime =true);
                             false

@acer 

Thanks

I got them all three types of the "quotes" on the keyboard 
So, what's the problem you ask? ..i try again

Also  i looked a the calculation of a population modelled with a differential equation
There are some errors in it, perhaps it can be solved ?

It are old worksheets and don't know if the calculation can be modernized.

@acer 

Thanks
Good to know.

Then i use in the worksheet only 2D input as easy reading math and not for computing.

@Carl Love 

Thanks 

The legend option is hardcoded in Maple then.
Why is it necessary to get a box around the legend if you want it to be more sober  the plot ?

It's not a easy thing to do to program this for a average Maple user as you did.
To make it general for more advanced functions as needed could  be helpful ?

@acer 

Thanks

Its was wondering why i get "round d's" for the derative after using the right-click menu to chance it to 2D Input , but it seems that you get  the straight d ( Leibniz notation if i am correct)

I will reproduce it again and look now again.

diff(lhs(%)-rhs(%)=0);

Put the vertical cursor in the expression or at the end after or selected the whole expression, and in all cases i get  :  

Note: the prime notation i does not work too , because it is not on my keyboard ? 
The language for the keyboard is choosable, but the feedback on my computer about this has disappeared? 

@Carl Love 

Interesting, how you have made it ?
I like to see round parenthesis for the the graph intersections and with a dot 
Don't like the black borders around the legenda 

But that's me...

First 37 38 39 40 41 42 43 Last Page 39 of 73