Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
62 views
ubuntu2204
#define the function #declare t as a variable t=var('t') s(t)= t^3-6*t^2 #plot the function p0= plot(s(t),-50,50,ymin=-50,ymax=50,legend_label='s(t)=t^3-6t^2',frame=True,color='black') p0.axes_labels(['s-axis','t-axis']) p0.show() print('this is the graph of the given position function') #find velocity of the position function v(t)=diff(s(t),t) print('the velocity of the position function is', v(t)) #find acceleration of the postion function a(t)=diff(s(t),t,2) print('the acceleration of the postion function is', a(t)) #find speed of the position function f(t)=abs(sqrt(3^2+(-12)^2)) print('the speed of the position function is', f(t)) #graph velocity, acceleration, and speed #velocity will be shown as green p1=plot(v(t),-10,10,ymin=-30,ymax=30,legend_label='v(t)',frame=True,color='green') p1.axes_labels(['s-axis','t-axis']) #acceleration will be red p2=plot(a(t),-10,10,ymin=-30,ymax=30,legend_label='a(t)',frame=True,color='red') p2.axes_labels(['s-axis','t-axis']) #speed will be shown as blue p3=plot(f(t),-10,10,ymin=-30,ymax=30,legend_label='f(t)',frame=True,color='blue') p3.axes_labels(['s-axis','t-axis']) show(p0+p1+p2+p3) #time when vlocity is at a minimum print('velocity is at a minimum') solve(-40==3*t^2-12*t,t) #time when acceleration is at a minimum print('acceleration is at a minimum') solve(-40==6*t^2-12,t) #time when speed is maximum print('speed is at a maximum') solve(0==3*t^2-12*t,t) #time when velocity is at maximum print('velocity is at a maximum') solve(0==3*t^2-12*t,t) #time when acceleration is at maximum print('acceleration is at a maximum') solve(0==6*t-12,t) #define c as a function #define q as the variable q=var('q') c(q)= (600)/0.3*q+5 print('c(q) is', c(q)) #plot the function p4=plot(c(q),-10,10,ymin=-30,ymax=30,legend_label='c(q)',frame=True,color='blue') p4.axes_labels(['x-axis','y-axis']) #graph of the derivative of c(q) dcq= diff(c(q),q) print('the derivative is', dcq) p5=plot(c(q),-10,10,ymin=-30,ymax=30,legend_label='c(q)',frame=True,color='blue') p4.axes_labels(['x-axis','y-axis']) p5=plot(dcq,-10,10,ymin=-30,ymax=30,legend_label='derivative of c(q)',frame=True,color='red') p5.axes_labels(['x-axis','y-axis']) show(p4+p5) #find the integral to find how much it costs to produce 30 bikes icq=integral(c(q),q,0,30) print('the integral as we produce 30 bikes is',icq) p6=plot(icq,-10,10,ymin=-30,ymax=30,legend_label='integral of c(q), producing 30 bikes',frame=True,color='red') p6.axes_labels(['x-axis','y-axis']) #the cost of producing with fixed cost 2000 icq2=integral(c(2000),2000,0,30) print('the integral as we produce 30 bikes with a fixed cost of 2000 is', icq2) p7=plot(icq2,-10,10,ymin=-30,ymax=30,legend_label='fixed cost of 2000, producing 30 bikes',frame=True,color='red') p7.axes_labels(['x-axis','y-axis']) show(p6+p7)
this is the graph of the given position function the velocity of the position function is 3*t^2 - 12*t the acceleration of the postion function is 6*t - 12 the speed of the position function is 3*sqrt(17)
velocity is at a minimum [t == -2/3*I*sqrt(21) + 2, t == 2/3*I*sqrt(21) + 2] acceleration is at a minimum [t == -1/3*I*sqrt(14)*sqrt(3), t == 1/3*I*sqrt(14)*sqrt(3)] speed is at a maximum [t == 0, t == 4] velocity is at a maximum [t == 0, t == 4] acceleration is at a maximum [t == 2] c(q) is 2000.00000000000*q + 5 the derivative is 2000.00000000000
the integral as we produce 30 bikes is 900150.0 the integral as we produce 30 bikes with a fixed cost of 2000 is 120000150.0