[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 16 KB, 489x395, 1536465810797.jpg [View same] [iqdb] [saucenao] [google]
16036863 No.16036863 [Reply] [Original]

eng here, I have a task for the math nerds.

I need a flexible model to describe a polynomial but the constraints are fucking me up.

here is the problem.

x-axis is the day in hours (or minutes), y-axis is temperature.
every day has individual length, every day has individual temperatures.
the idea is to have a general model for temperature development over one day by providing a polynome.
every day starts with sunset(x=0) for us.
I have the length, tmin and tmax of the days.
(the aim is to describe time ranges of a day above a certain temperature - but thats not important here)

x= 0h (or 0 mins) is the minimum temperature (which is roughly around sunset and to make it easier we put it exactly there)
x= 24h (or 1440 mins) is again the same minimum temperature.
both points are local minima and also the value tmin.

this part is easy.
difficult to me is what comes next.

at a certain length (that I know but varies) the maximum temperature is reached. its always 75% of the length of a day to make it easier here.
for example when a day has 10 hours of light tmax will be reached at x = 0.75*10h = 7.5h (or 0.75*10*60 mins), when the day is 8h it is 6h etc.
this point needs to be the value tmax AND a local maximum.

this gives me 6 equations for a polynome.
y(x=0h) = tmin
y'(x=0h) = 0
y(x=24h) = tmin
y'(x=24h) = 0
y(x=0.75*length)=tmax
y'(x=0.75*length)=0

>> No.16036865

second or third degree polynomes cant do that obviously.

fourth degree polynomial could technically do it but there are 6 equations so the system is overdetermined.
I have tried to fit that by going through some combos but all I got was fullfilling x=0h and x=24h perfectly while there was no chance to make x=0.75*length the local maximum in a flexible way.

so the answer is just a higher degree polynomial, r-right?
wrong.
this is out of control.
there is no limiting of additional maxima or minima within the day. could be that you match all parts but you have another minimum or maximum in there.
I cannot determine a Langrange polynomial numerically with flexible equations and I am afraid that this wont be able toreliably exclude additional extrema.

fuck me.

a small sketch is coming soon.
right now Im doing it with 2 poor triangles. up to 12% deviation from average day temperature. so I have the average temperatur tavg also available. maybe this helps.

>> No.16036872
File: 9 KB, 946x453, sketchy.png [View same] [iqdb] [saucenao] [google]
16036872

>> No.16036886
File: 10 KB, 946x453, sketchy.png [View same] [iqdb] [saucenao] [google]
16036886

>>16036872
better version, the minima were missing.

>> No.16036904

>>16036863
sunset = sunrise, sketch is correct.

>> No.16037274

>>16036863
Might be overkill but maybe a skewed Gaussian would work instead of a polynomial.

>> No.16038553
File: 789 KB, 720x757, 1620472611803.png [View same] [iqdb] [saucenao] [google]
16038553

>>16037274
ok, will have a look, that could really work out. probably.
thought about weibull/rr now for a while.
will give it a try tomorrow and look at the details.

>> No.16038555

>>16037274
anyway, thank you. are you what is left of old /sci/?