find numerical answers using Matlab

2 views (last 30 days)
Solve for the variable y in terms of t, for given initial condition.
dy/dt= 20 cos 5t +8 ; y(0)=0
What is the value of y for t=4?
  5 Comments
Steven Lord
Steven Lord on 24 Jul 2022
Since this is a homework assignment, if you show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
John D'Errico
John D'Errico on 24 Jul 2022
Experts won't do your homework for you. You won't learn anything if we do it for you, except how to get someone to do your work for you. And your teacher will rarely be happy with your posting your assignments on Answers. This is not a loose comment, but one pointing out why it is inappropriate to post your homework assignments online with no effort made.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 23 Jul 2022
Integrate the right hand side with respect to t, remembering the constant. Solve for the constant given the initial condition. Evaluate the expression at the given t
  3 Comments
Walter Roberson
Walter Roberson on 24 Jul 2022
Use Symbolic toolbox syms and int() and subs() . You will not need solve()
Walter Roberson
Walter Roberson on 25 Jul 2022
syms t C
dydt = 19 * tan(7*t) + 11 * sin(8*t) + 11
dydt = 
y = int(dydt)
y = 
C = -subs(y, t, 0)
C = 
y = simplify(y + C)
y = 
simplify(subs(y, t, 9))
ans = 
%crosscheck boundary
subs(y, t, 0)
ans = 
0

Sign in to comment.

More Answers (0)

Categories

Find more on Function Creation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!