How to remove "y(x)" from this DE solution?

  • Context: Maple 
  • Thread starter Thread starter Dwightun
  • Start date Start date
  • Tags Tags
    Maple
Click For Summary
SUMMARY

The discussion focuses on extracting the solution of a differential equation (DE) in Maple without the "y(x)=" notation. The user seeks to obtain the expression sin(pi x /2) directly for use in an array. The solution involves using the assign command after solving the DE with dsolve, specifically for the second-order ODE defined as diff(y(x), x, x) = -y(x) with initial conditions y(0) = 1 and D(y)(0) = 0. This method allows for the evaluation and plotting of the solution without the function notation.

PREREQUISITES
  • Familiarity with Maple software and its syntax
  • Understanding of differential equations and their solutions
  • Knowledge of initial conditions in ODEs
  • Experience with plotting functions in Maple
NEXT STEPS
  • Learn how to use the Maple assign command effectively
  • Explore the dsolve function in Maple for various types of ODEs
  • Investigate plotting techniques in Maple for visualizing solutions
  • Study the implications of initial conditions on the solutions of differential equations
USEFUL FOR

Mathematicians, engineers, and students working with differential equations in Maple, particularly those looking to manipulate and visualize solutions without standard function notation.

Dwightun
Messages
2
Reaction score
0
TL;DR
DE solution
Hi,
I have my solved DE, like this:
1588938108626.png

How can i get sin(pi x /2) (without "y(x)=") to put it in array?
Thank you in advance
 

Attachments

  • 1588938041446.png
    1588938041446.png
    1.3 KB · Views: 258
Physics news on Phys.org
Dwightun said:
Summary:: DE solution

Hi,
I have my solved DE, like this:
View attachment 262344
How can i get sin(pi x /2) (without "y(x)=") to put it in array?
Thank you in advance
It is not correct to use the output of dsolve to define a function like you did above.
Instead, you can use the assign command, for example like this:
[CODE title="Maple 2018"]
restart;

# Specify ODE and initial conditions.
ode := diff(y(x), x, x) = -y(x);
ics := y(0) = 1, D(y)(0) = 0;

# Solve ODE and assign the output.
sol := dsolve({ode, ics}, y(x));
assign(sol);

# Now you can evaluate the solution.
plot(y(x), x = 0..2*Pi);
[/CODE]
 
Last edited:
  • Like
Likes   Reactions: Dwightun

Similar threads

Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K