Why do I get a Warning: "cannot find explicit solution"?

I want to calculate in a mass-spring-damper system which "k0" value will be A<25. I have a following MatLab code:
clc
clear
syms k0
v0 = 2.5
c0 = 221229.947
m0 = 53.375
t = 0:0.01:1
alfa = sqrt(c0/m0)
beta = k0/(2*m0)
delta = sqrt(alfa^2 - beta^2)
A = v0/(sqrt(alfa^2 - (k0/(2*m0))^2)) .* exp(-(k0/(2*m0) .* t)) .* sin((sqrt(alfa^2 - (k0/(2*m0))^2)) .* t) * 10^3
solA = solve(A < 25, k0, 'MaxDegree', 4)
Thank you in advance.

 Risposta accettata

t = 0:0.01:1
Your t is a vector.
A = v0/(sqrt(alfa^2 - (k0/(2*m0))^2)) .* exp(-(k0/(2*m0) .* t)) .* sin((sqrt(alfa^2 - (k0/(2*m0))^2)) .* t) * 10^3
Your A is in terms of t so your A is a vector.
solve(A < 25, k0, 'MaxDegree', 4)
That tries to solve for a single k0 that satisfies the entire vector of A simultaneously.
Also you need to know that when you solve() an inequality and do not use 'ReturnConditions', true then solve chooses a single representative value rather than describing the boundaries under which the inequality becomes true.
Also note that you did not confine to the real numbers so it will return complex solutions.

1 Commento

Your equation is non-linear. For particular k0 values k0 > 0, it has up to 21 different t solutions in the range 0 to 1. It is difficult to solve. It does not give you a quartic (degree 4 polynomial) for any particular t value because of the sin()
I do not think you will be able to proceed symbolically.

Accedi per commentare.

Più risposte (1)

How can I calculate "k0" value? I've also tried with two variables (k0, t) and I would seek the maximum from the derivative. But I didn't get a solution...

Community Treasure Hunt

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

Start Hunting!

Translated by