Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PYTHON QUESTION #Lets create a few plots using numpy and matplotlib #Below this

ID: 3599678 • Letter: P

Question

PYTHON QUESTION

#Lets create a few plots using numpy and matplotlib

#Below this Comment create a scale for our dependent variable <t>. Have it span 0<=t<=150

#Below this comment create your dependent variabple for position <x>. x(t) = t^2(sin(theta*t+phi))
#Theta and Phi will start as constants. Have theta=0.25, phi = 2

#Create a subplot() figure for the plots of x(t) and its derivitives v(t) and a(t).
#Have the plots appear in one row, side by side
#Be sure that plots are properly labeled
#You will need to use the sympy function lambdify(). I suggest you refer to its documentation.

#create a plot with all three graphs above, superimposed onto one plot. Use different line types/colors for each plot

#Now we will have theta and phi vary over t
#Create a plot similar to the one above contianing x(t), v(t), a(t) but have theta = 0.25t+5 and phi constant as before

#create a similar plot as above but this time phi = 30t^2 and theta constant as before

#Create a final plot as above but this time have theta and phi both vary with time

#create a subplot() figure with all 4 graphs, proper titles, and in whichever configureation you wish

Explanation / Answer

clc; clear all;
pwf= [3865.6, 2991.1, 1770.8];
qo=[988.2, 2167.2, 3180.4];

syms p c n
n=linspace(0.5,1,10)
for (i=0.5:1)
    eq1=qo==(c((p^2)-(pwf.^2)).^n(i));
    [p,c]=vpasolve(eq1,[p,c],[0,inf]);
end