python defferensiallikninger

Her kan du stille spørsmål vedrørende problemer og oppgaver i matematikk på høyskolenivå. Alle som har kunnskapen er velkommen med et svar. Men, ikke forvent at admin i matematikk.net er spesielt aktive her.

Moderatorer: Vektormannen, espen180, Aleks855, Solar Plexsus, Gustav, Nebuchadnezzar, Janhaa

Svar
mawo

Hei! Kan noen hjelpe meg med en programmeringsoppgave I python?

dh/dt= −(r/R)**2 * sqrt(2*6*h)

The initial condition follows from the initial height of water, h0, in the
tank: h(0) = h0.
Solve (E.61) by a numerical method of your choice in a program. Set
r = 1 cm, R = 20 cm, g = 9.81 m/s2, and h0 = 1 m. Use a time step of
10 seconds. Plot the solution, and experiment to see what a proper time
interval for the simulation is. Make sure to test for h < 0 so that you do
not apply the square root function to negative numbers. Can you find
an analytical solution of the problem to compare the numerical solution
with?

Hva er dte de vil jeg skal finne ut? Skal jeg bare plotte ting inn I formelen I oppgaven? Eller må jeg regne ut noe selv? Og skal man få flere h verdier eller bare en? og hvordan plotter jeg det?
Svar