Matlab Sysmolic maths differential equation

Click For Summary
SUMMARY

In MATLAB, it is possible to represent unknown functions such as x(t) using symbolic math. Users can define a function with derivatives, as demonstrated with the command y = sym('y(t)'), which allows for the representation of second and first derivatives in equations. The expression f = diff(y,2) + diff(y,1) + y successfully combines these derivatives, showcasing MATLAB's capability to handle symbolic differentiation effectively.

PREREQUISITES
  • Familiarity with MATLAB syntax and commands
  • Understanding of symbolic mathematics
  • Knowledge of differential equations
  • Experience with MATLAB's Symbolic Math Toolbox
NEXT STEPS
  • Explore MATLAB's Symbolic Math Toolbox documentation
  • Learn about advanced symbolic differentiation techniques in MATLAB
  • Investigate solving differential equations using MATLAB's dsolve function
  • Study the application of symbolic functions in modeling dynamic systems
USEFUL FOR

Mathematics students, engineers, researchers, and anyone interested in using MATLAB for symbolic computation and solving differential equations.

SpartanG345
Messages
69
Reaction score
1
Hi

is it possible to represent unknown functions eg x(t) in MATLAB equations ?

eg have f = x''
diff(f) = x'

or have a derivative represented via differential eg dx/dt
 
Physics news on Phys.org
finally found it out for those who want to know

>> y = sym('y(t)')

y =

y(t)


>> f = diff(y,2) + diff(y,1) + y

f =

diff(y(t),$(t,2))+diff(y(t),t)+y(t)


>> pretty(f)

/ 2 \
|d | /d \
|--- y(t)| + |-- y(t)| + y(t)
| 2 | \dt /
\dt /
>>
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K