Questions tagged [differential-equations]

An equation that relates some unknown function itself and its derivatives of various orders.

An equation that relates some unknown function itself and its derivatives of various orders, for instance x'' = g (free fall) or x' = v (movement under constant speed). Developers solve differential equations numerically or write symbolic engines to solve analytically.

1488 questions
-1
votes
1 answer

dsolve MATLAB :Explicit solution could not be found

I want to solve the differential equation. MATLAB shows warning: clear all syms x f(x) theta eq = (-6*x+(-7+theta)*f*diff(f,x))*(1+diff(f,x)^2)+x*f*(diff(f,x,x))==0 cond = f(0)==1 dsolve(eq,cond) Warning: Explicit solution could not be found. >…
-1
votes
1 answer

Solving differenial equation with multiple function by MATLAB

I need to solve differential equation given below dϑ2/dt= k2*ϑ_1-k3*ϑ_2 where k2 and k1 are constant I solved the equations but I think Matlab just treating ϑ_1 as constant whereas it is also a function of time or (t). Here is my code syms…
Goenitz
  • 1
  • 1
-1
votes
2 answers

How to solve a differential equation with non-constant coefficient?

I have an equation like this: dy/dx = a(x)*y + b where a(x) is a non-constant (a=1/x) and b is a vector (10000 rows). How can I solve this equation?
Ari
  • 15
  • 4
-1
votes
1 answer

Euler Method recursive

I am quite new to coding in C. I am trying to apply Eulers Method for an first order ODE in a quite simple way, both as an iterative as well as an recursive function. I can't put the recursive implementation together. #include #include…
-1
votes
1 answer

How to use improved Euler's method formula to solve an IVP involving population growth?

Hi so I have a problem from my differential equations class that I am having difficulty solving with the improved Euler's method: The logistic equation for the population (in thousands) of a certain species is given by dP/dt = 2P-2P^2. With t being…
mobcity zkore
  • 263
  • 1
  • 8
-1
votes
3 answers

How can I make a movie of the plotted function due to time (for t=0:0.1:2)?

I want to ask you how to make a movie of the plotted function due to time for t=0:0.1:2. In the code I wrote the formula of the differential equation (gif) after i wrote the formula of the coefficient (a). In the formula of gif i gave (x-v*t)…
Ozan
  • 27
  • 5
-1
votes
1 answer

How to do numerical differentiation using Matlab?

Can anyone help me with doing nemerical differentiation using matlab for the function on this image: Partial Fraction using Differentiation Where the function F(gamma) is given by eq (11) in the following image: F(gamma) I have never done…
user42138
  • 19
  • 7
-1
votes
1 answer

Differential equation of kepler orbit numerical solution in python?

So, I'm trying to write a code that solves the (what we called) differential equation of an orbit in the kepler potential V(r)=-1/r when you do the math you get a differential equation that looks like this: d^2u/d(fi)^2 + u - m/M^2=0 where…
-1
votes
2 answers

error when solving ordinary differential equation numerically in C - error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token

I get following error when I compile my C code. I am using Numerical Recipes 2nd ed. functions rk4() for solving a first order differential equation. I am not expert in this field. Any help will be highly appreciated. Error…
atom
  • 153
  • 1
  • 9
-1
votes
1 answer

Runge Kutta 4 in C++ for Lorenz system

Can someone find the error in my code ? It work ok in the special dots , but the tolerance doesn't fit to the method. My Errorstepper is pretty simple , so i don't think that the problem in it. Please help. #include #include
-1
votes
1 answer

2d motion simulator for given differential equations

Phet has a really neat simulation here for gravitation orbits that you can play around with. Are there any other simulations out there that let you do the same, but also allow you to play around with the equations of motion? (ie. diff equations). I…
-1
votes
1 answer

why the numerical result is different (RK45)?

this is the test for equation differential using runge-kutta45: f(x,y)= (-5*x - y/5)^1/8 + 10 why the numerical result is different? I used : function Rk_JL() f(x,y)= (-5*x - y/5)^1/8 + 10 tspan = 0:0.001:n y0 = [0.0, 1.0] return ODE.ode45(f,…
-1
votes
1 answer

Differential Eq using deSolve in R

My apologies, for being unclear earlier. I now understand the function a bit more, but could use some assistance on a few aspects. I would like to get back a relationship of conversion ( X ) versus volume ( V ), or the other way around would be…
deposition
  • 535
  • 2
  • 4
  • 9
-1
votes
2 answers

ODEINT output to txt file instead of console

Is there a way to write the outputs of t and x of this example to a txt file instead of the console. Thanks! This is the example I copied from Odeint website. #include #include using namespace std; using…
hn.phuong
  • 835
  • 6
  • 15
  • 24
-1
votes
1 answer

explicitly solving ODEs using RK4

My two first order differentials are as follows y1' = -sin(y0) + (gamma)*cos(y0)sin(beta * x) and y0' = y1 where (theta)'' = y, (theta)' = y1, theta = y0 My original equation was (((d^2)*theta)/dt^2)=-sin(theta)+(gamma)cos(theta)sin(Bx) How…
darren
  • 47
  • 1
  • 9