Thread has been deleted

Last comment
pastebin.com/RYZfv02Y
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

misswrote something
new one:
pastebin.com/Bd6CP8KS

nobody?

1 reply

ooof

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

8 replies

Can u do it on ideone.com or something so I can see it and compare it to mine, cuz I think I did it pretty wrong

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

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.
imgur.com/Sj0dX1A

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

2 replies

??????
Its a task, u cant change the task bro?? lol....

1 reply

Bro I'm mentally challenged, answer is 475

its hs math bruh

DO YOUR HOMEWORK YOURSELF ffs

1 reply

+1 people are so lazy, if you can't do this one how will you do the next one?

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)
plt.show()

22 replies

are u sure thats correct? can u write it in ideone.com or something. what are those KX = [] ?
I mean it might be correct but idk

19 replies

i dont know what ideone.com 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

1 reply

please ignore this guy's code, functionally it sucks and it follows no coding guidelines such as PEP-8

16 replies

can u give me an example then? cuz mine and his differs quite a bit. can u do one in ideone.com or somewhere and post it here??

15 replies

no because this is your homework and you should study enough to understand how to approach it

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.

13 replies

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.

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

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 desmos.com to check the graphs.

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..

5 replies

#16 has done that correctly, check that out

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
?

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)

2 replies

but is this: ideone.com/8qtjCj
correct then?

1 reply

your range is too low. change line 17 to:
for x in np.arange(-20000, 20000, 100):

but what do u mean -0,01x^2 /2 + 50x?
It is just -0,01x^2 + 50x
not /2???? or?

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.

1 reply

and why 0.03 * x * x/2???
why not just 0.03 * x?

1 reply