Thread has been deleted
Last comment
Python Things innit
rain | 
Norway RainNumber1 can someone program this, I want to see what I have is correct. Might give a skin as well btw. But either way thanks in advance
2021-04-08 18:56
Topics are hidden when running Sport mode.
misswrote something new one:
2021-04-08 18:57
2021-04-08 19:01
1 reply
2021-04-08 19:05
United States arrow__
2021-04-08 19:03
You have to integrate the growth functions, find out c using the 3000 and 0 values that you have, then you plot the graphs you get... Add the two functions that you get to get a compound function, it will be a cubic function (parabola), so differentiate that, let it equal to zero to find the X value when the profit is maximised
2021-04-08 19:07
8 replies
Can u do it on or something so I can see it and compare it to mine, cuz I think I did it pretty wrong
2021-04-08 19:10
7 replies
I reckon the problem is wrong, I got this: K(x) = 0.015x^2+31x+3000 I(x) = -0.005x^2+50x Compound function: 0.01x^2+81x+3000 Differentiated: 0.02x+81 However in the end I have a minus value for x, which shouldn't be possible... Tbh I don't know how to program graphs but mathematically seems pretty sus to me EDIT: I reckon it's expected of you to find the solution graphically, but from algebra it makes no sense
2021-04-08 19:17
6 replies
Your integrals are right, not sure what you mean by compound function, I might just be having a stroke though and forgetting something simple. Here's the graph of the two integrals.
2021-04-08 19:29
3 replies
I'm retarded, you have to subtract the costs from the income I(x) - K(x) = -0.02x^2+19x-3000 Differentiated: -0.04x+19 x = 475 (profit largest when 475 of whatever is produced) By compound function I mean two added together, it's not a strict mathematic definition, we use it here though
2021-04-08 19:32
2 replies
Ah ok, yeah that makes sense. I haven't done optimization in years, my calculus outside of series/sequences is pretty rusty. I feel bad that I didn't get it right away lol
2021-04-08 19:38
475 sounds right But what do I write in python to get that? And can u write the whole programm/code in python and post it here or on or somewhere. To see if I was right?
2021-04-08 21:27
?????? Its a task, u cant change the task bro?? lol....
2021-04-08 19:29
1 reply
Bro I'm mentally challenged, answer is 475
2021-04-08 19:33
its hs math bruh
2021-04-08 19:20
2021-04-08 19:22
1 reply
+1 people are so lazy, if you can't do this one how will you do the next one?
2021-04-08 19:24
import numpy as np import matplotlib.pyplot as plt def I(x): return (-0.01 * x * x)/2 + 50 * x def K(x): return (0.03 * x * x)/2 + 31 * x + 3000 Kx = [] Ky = [] Ix = [] Iy = [] for x in np.arange(0, 1000, 0.1): Ix.append(x) Kx.append(x) Iy.append(I(x)) Ky.append(K(x)) plt.plot(Kx, Ky) plt.plot(Ix, Iy)
2021-04-08 19:23
22 replies
are u sure thats correct? can u write it in or something. what are those KX = [] ? I mean it might be correct but idk
2021-04-08 19:51
19 replies
i dont know what is im sorry, the Kx = [] in python is just saying that Kx is a list (regarding the question why 0.03 * x * x/2) the reason is just because (0.03 * x * x)/2 + 31 * x + 3000 is the primitive of the function 0.03x + 31 that has value 3000 when x = 0
2021-04-08 20:03
1 reply
ok ty. It could be right tbh. But how do I find out when the company had its highest profit? Would be very thankful if you could help me with that as well
2021-04-08 20:16
United Kingdom JupiterACE
please ignore this guy's code, functionally it sucks and it follows no coding guidelines such as PEP-8
2021-04-08 20:18
16 replies
can u give me an example then? cuz mine and his differs quite a bit. can u do one in or somewhere and post it here??
2021-04-08 20:21
15 replies
United Kingdom JupiterACE
no because this is your homework and you should study enough to understand how to approach it
2021-04-08 20:21
14 replies
I have just started with this topic.... and I am stuck, I have sat here for 12 hours trying to understand it... I regret all my life choices... if its so easy for u I would be thankful if u could just show me what u could do... I will learn a lot from that... it doesnt help sitting here stuck for another day.
2021-04-08 20:23
13 replies
United Kingdom JupiterACE
maybe you're stuck because you need to go back and approach the problem differently, reread your textbook. it's not that deep.
2021-04-08 20:29
this is an easy question. u just need to know the basics of integration and differentiation to understand what #12 has done. once u understand that, writing a code for plotting the graphs of the 2 functions isnt very hard either. you can easily look it up on google.
2021-04-08 20:32
11 replies
but #12 is wrong tho??? The income is supposed to go down with -0.01 tho.... and his programm neither of them was going negative... they were both going almost equally up.... I have tried everything. Please help
2021-04-08 20:45
10 replies
(-0.01x^2)/2 + 50x is actually an increasing function until it approaches large values of x (somewhere around x = 2000). it only has a turning point at x = 5000. which is why u think its 'going up', but if u zoom out or increase the range of x, u will find out that it's a quadratic graph as it should be. u can use the graphing calculator on to check the graphs.
2021-04-08 21:00
9 replies
so they are both supposed to increase?? But how do I find in the plot/graph where the profit was the highest? Cause I have no idea what I have to write to get that in python..
2021-04-08 21:15
5 replies
#16 has done that correctly, check that out
2021-04-08 21:20
4 replies
He wrote: I(x) - K(x) = -0.02x^2+19x-3000 Differentiated: -0.04x+19 I cant write this in Python tho??? cuz its supposed to be K'(x) = 0.03x + 31 I'(x) = -0.01x + 50 ?
2021-04-08 21:23
3 replies
once again, youre mixing up K'(x) and K(x). in order to find the total profit for any business in real life, you subtract the total cost from the income. which is exactly what you have to do here. profit(x) = I(x) - K(x)
2021-04-08 21:31
2 replies
but is this: correct then?
2021-04-08 21:36
1 reply
your range is too low. change line 17 to: for x in np.arange(-20000, 20000, 100):
2021-04-08 22:23
but what do u mean -0,01x^2 /2 + 50x? It is just -0,01x^2 + 50x not /2???? or?
2021-04-08 21:16
2 replies
the question you posted says: K'(x) = 0.03x + 31 I'(x) = -0.01x + 50 notice the ' symbol. this means that these are the differential equations of K(x) and I(x) respectively. now part (a) says Plot K (x) and I (x). so you have to find out K(x) and I(x) from their respective given derivatives (given above). so how do u find them out? u integrate K'(x) to find K(x) and use K(0) = 3000 to find the constant of integration which gives u the equation for K(x) that #12 has used. the same goes for I(x). these are the basics of integration and differentiation. you should have mastered these way before you move on to coding questions regarding these two topics.
2021-04-08 21:21
1 reply
Yeah I am really struggeling in programming and modelling... I should have never had the subject at all... Hopefully I can at least pass and survive the subject if I can get this task right... but idk if its right enough but how do I find the whereabouts in the graph to when it was the most profit?
2021-04-08 21:22
and why 0.03 * x * x/2??? why not just 0.03 * x?
2021-04-08 19:56
1 reply
Dude, the integral is the reverse point of the derivative: If you derive 2x³ + 5: => (3).2x² + 0 (power rule and derivative of constants always= 0) => 6x² Integrating 6x² is the inverse process: => 6x² => 6x³ / 3 (add the exponent by 1, ofc we need to divide by this value, as we multiplied in derivative) => 2x³ + C ( when integrating we add this constant therm as any derived constants vanish) You see, whe got the derivative of 2x³ + 5 and made it back integrating. Derivatives tell us the acceleration of certain function, if i walk some value in (X axis), how much i walk in the function (Y axis). Integrals tells us about the area of a function, that's why they are always presented in intervals, and if they have something like from -inifity to +inifinity, it's the same to say, i want the full area of certain function. Maybe this piece of code helps...
2021-04-08 22:23
Login or register to add your comment to the discussion.